I’ve decided to make my various Windows installs boot up, automatically log in, then lock themselves. This is because I have tired of turning my PC on, waiting for it to boot up, then logging in and waiting about the same amount of time for the login process to go through.
A simple script to lock a Windows install – throw this into a .vbs file and double click it and you’re done:
Set shell = WScript.CreateObject("WScript.Shell")
shell.Run "rundll32.exe user32.dll,LockWorkStation",1,false
Neat.
I’m assuming you then plaves the VBScript into the startup?
Have you had any issues of programs not loading once the lock is in place?
Unfortunately it won’t work here at school as we have roaming profiles. You won’t be able to set an initial account because you don’t know who will be sitting down on the PC. Might be more useful at home.
Yep, just drop the script into the startup folder. You might want to also drop the line:
Wscript.Sleep 10000
(where the number is the number of milliseconds to sleep for), just in case there’s any issues locking the box immediately on startup (I can’t imagine any).
I only set this up at home last night so I’ll let you know how it goes when I turn my PC on when I get home!
boring fact: that kind of usage of rundll32.exe just accidentally works
http://blogs.msdn.com/oldnewthing/archive/2004/01/15/58973.aspx ; and comment in http://weblogs.asp.net/bdesmond/archive/2003/12/11/43016.aspx