Jump to content
Sign in to follow this  

auto logon

Recommended Posts


Someone know where to find a function/program to auto-logon to system, but not every time!

Maybe more detales.. I have a script to testing, and 3 computers with win xp/vista/server, and I need to run it on every computer(I use psexec), but there is a problem, because there is no certainty the computers will be ON and logon with some user. I need to use wake on lan(I have that), and remotly make logon in local desktop.

Is there any kind program or function to do logon?

it must work on different situations(first logon, screen is blocked, the alt+ctrl+delete is needed or not) and systems, just send({tab}) etc. is not enough

//sorry for my english XD

Share this post

Link to post
Share on other sites

Someone know where to find a function/program to auto-logon to system, but not every time!

There is no programmatic way to do logon, this is intentional by design to prevent Trojans stealing passwords. In fact, MS go to considerable lengths to ensure coders cannot bypass the winlogon process, which runs in a separate desktop. Thus, Send() etc. won't work for the logon dialog-box.

However, two methods of autlogon exist (assuming XP, Vista/7 much the same though)

Run 'Control userpasswords2'

Select the account to make automatic, and untick the box 'Users must supply a password...'

Or, manually make entries in the Winlogon registry key as per:


Both of these methods operate fulltime or not at all. Though, you can turn autologon off/on before shutdown by modifying the registry values, provided you know of this need in advance.

BTW I'm assuming workgroup computers here, if they are in a domain the above methods still apply but need a bit more configuration.

If you wish to intercept the logon process after authentication but before the desktop is shown, you can do this by way of hooking the 'shell' pointer in the Winlogon registry key. (Point this to your own program, and make sure this then launches explorer.exe so the desktop is loaded.)

Other option I can think of, could you make your script run from the scheduler, under user credentials? This might remove the need for interactive logon.

Edited by Anteaus

Share this post

Link to post
Share on other sites

I use this at work (compiled). At shutdown I execute with the "on" param. At Login I run without param to remove autologin from registry.

$regkey = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon"
If StringInstr($cmdlineraw,"on") Then

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.