MarcV Posted March 16, 2011 Posted March 16, 2011 Hello, I created a autoit exe that is sheduled in windows. It opens a program and simulate actions that activate the program. The problem is that the PC autolock after a while, and the simulation does not work because the script waits until the program is opened and fucused. Is there a way to unlock the PC, so the script can work fine. Thanks, Marc
MrMitchell Posted March 16, 2011 Posted March 16, 2011 (edited) Hello, and Welcome. Simple search on "unlock workstation" reveals it's been covered several times before... Edited March 16, 2011 by MrMitchell
MarcV Posted March 17, 2011 Author Posted March 17, 2011 (edited) Hello, and Welcome. Simple search on "unlock workstation" reveals it's been covered several times before... Hi, After a search, I found this: Local $sDomain = 'domain' Local $sUserN = 'user' Local $sPass = 'password' RegWrite('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon', 'AutoAdminLogon', 'REG_SZ',1) RegWrite('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon', 'DefaultDomainName', 'REG_SZ', $sDomain) RegWrite('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon', 'DefaultUserName', 'REG_SZ', $sUserN) RegWrite('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon', 'DefaultPassword', 'REG_SZ', $sPass) But it's not working. Did I forget something? Thanks, Marc Edited March 17, 2011 by MarcV
hannes08 Posted March 17, 2011 Posted March 17, 2011 Hi MarcV, what you found is a way to login to Windows without the need of entering username and password. This does not prevent you from being locked and unlock your session. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
kaotkbliss Posted March 17, 2011 Posted March 17, 2011 if you are aloud to keep the workstation unlocked then you can use something like While 1 $mouse=MouseGetPos() If $mouse[0] > @DesktopWidth/2 And $mouse[1] > @DesktopHeight/2 Then MouseMove($mouse[0]-2,$mouse[1]-2) ElseIf $mouse[0] < @DesktopWidth/2 And $mouse[1] < @DesktopHeight/2 Then MouseMove($mouse[0]+2,$mouse[1]+2) ElseIf $mouse[0] > @DesktopWidth/2 And $mouse[1] < @DesktopHeight/2 Then MouseMove($mouse[0]-2,$mouse[1]+2) ElseIf $mouse[0] < @DesktopWidth/2 And $mouse[1] > @DesktopHeight/2 Then MouseMove($mouse[0]+2,$mouse[1]-2) EndIf Sleep(60000) WEnd to keep it from locking, then you can have your scripts run uninterrupted. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
Zedna Posted March 17, 2011 Posted March 17, 2011 (edited) Hello,I created a autoit exe that is sheduled in windows. It opens a program and simulate actions that activate the program.The problem is that the PC autolock after a while, and the simulation does not work because the script waits until the program is opened and fucused.Is there a way to unlock the PC, so the script can work fine.Thanks,MarcYou can write your script the way it will work also on locked station.Look here for more information:http://www.autoitscript.com/wiki/FAQ#Why...y_script_work_on_a_locked_work Edited March 17, 2011 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
MarcV Posted March 17, 2011 Author Posted March 17, 2011 You can write your script the way it will work also on locked station.Look here for more information:http://www.autoitscript.com/wiki/FAQ#Why...y_script_work_on_a_locked_workThanks,I prefer to unlock the station from within the AutoIt-script, more than running an external program (PStools remoteUnlock.exe)I will try it.Thanks,Marc
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now