Jump to content

Login after lock


 Share

Recommended Posts

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

Link to comment
Share on other sites

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 by MarcV
Link to comment
Share on other sites

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]
Link to comment
Share on other sites

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 game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

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

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_work

Edited by Zedna
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...