Sign in to follow this  
Followers 0
MarcV

Login after lock

8 posts in this topic

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



#2 ·  Posted (edited)

Hello, and Welcome.

Simple search on "unlock workstation" reveals it's been covered several times before...

Edited by MrMitchell

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by MarcV

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

Here's 1 you can check out...

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

#7 ·  Posted (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,

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0