MarcV 0 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 Share this post Link to post Share on other sites
MrMitchell 16 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 Share this post Link to post Share on other sites
MarcV 0 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 Share this post Link to post Share on other sites
hannes08 39 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] Share this post Link to post Share on other sites
MrMitchell 16 Posted March 17, 2011 Here's 1 you can check out... Share this post Link to post Share on other sites
kaotkbliss 146 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. 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
Zedna 280 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 Share this post Link to post Share on other sites
MarcV 0 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 Share this post Link to post Share on other sites