Jump to content

How to auto input pwd into screen saver dialog window?


C1628
 Share

Recommended Posts

I do not want my desktop to be accessed by other ppl., so I need to set screen saver and password.

Meanwhile I also need to run a scheduled script. But I found that I could not run my scheduled script "behind" screen saver.

Any help please?

Pardon me for being obtuse, but why not disable the screensaver password?

Edited by C1628
Link to comment
Share on other sites

While it is technically possible, I don't think you're going to find it very easy. The screen-saver runs in a different desktop. It's sort of the pre-cursor to Vista's UAC prompt (in secure mode). You would need to write a script that is run instead of your normal screen-saver (the script can, of course, run your normal screen-saver). In response to the event Windows sends when your screen-saver is being closed, you could perhaps automate the dialog, or launch a script to automate it. However, you of course would not want the dialog automated every time so you would need some crude form of inter-process communication to signal when the lock dialog should be skipped.

None of the steps are simple as it's rather an advanced concept since your goal is to beat Windows security.

Link to comment
Share on other sites

Here is something kind of close to what you wanted. Your screensaver does not have to be secure for this, but the following script does require that you already use a password to log on in order for it to actually lock the computer:

Global $myScheduledTask = "notepad.exe"
Global $scr = RegRead("HKEY_CURRENT_USER\Control Panel\Desktop", "SCRNSAVE.EXE")
ShellExecute($myScheduledTask)
Sleep(1300)
If StringLen($scr) Then
    ShellExecuteWait($scr, "/s")
Else
    ShellExecuteWait("Logon.scr", "/s")
EndIf
Run("RUNDLL32 USER32.DLL,LockWorkStation")
Sleep(400)
Edited by Squirrely1

Das Häschen benutzt Radar

Link to comment
Share on other sites

Is the problem that, with the screen saver being up (in its other desktop), that AutoIt is unable to 'see' windows/text so it would be unable to send commands to open windows?

Be open minded but not gullible.A hammer sees everything as a nail ... so don't be A tool ... be many tools.

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...