Automatic windows logon

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
sneffe
Newbie
Posts: 1
Joined: Fri Feb 22, 2008 1:56 pm

Automatic windows logon

Post by sneffe » Fri Feb 22, 2008 2:01 pm

Hi, does anyone have an example of how to have a script automatically logon to windows xp? Is it possible to run a script before windows has been logged on to? Im setting up a system to run automated test and therefore i would like to logon automatically to windows and afterwards run some automated scripts.

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Feb 22, 2008 2:06 pm

You cannot run UI scripts while Windows is logged out. For an explanation as to why see:

http://www.mjtnet.com/msfaq17.htm
http://www.mjtnet.com/msfaq171.htm

If you are using XP you should be able to enable AutoLogon to have your script automatically log into Windows on schedule, run the script and then log out again.

1. In XP ensure fast user switching is *disabled* so you have the regular old style login prompt.
2. In Macro Scheduler wnsure "Keep Scheduling on Exit..." is enabled in Tools/Options
3. In Macro Properties give your macro a schedule - select the days and time you want it to run.
4. In Macro Properties under AutoLogon check the *first* box "Unlock Computer To Run This Script...."
5. Initially *uncheck* the second box "When Started By..."
6. Enter your Windows XP username and password.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts