How to prevent auto-locking feature of an XP machine using VBscript

I did this...It sends 2 SCROLLLOCK Keys, quickly, so it wont interfere (well, not anything serious anyways) with any applications. It does this every 60 seconds....Cheers!

set wsc = CreateObject("WScript.Shell")
Do
WScript.Sleep (60*1000)
wsc.SendKeys ("{SCROLLLOCK 2}")
Loop

To stop it, open taskmanager and terminate the wscript.exe process. (If there are multiple, use the Command Line column to figure out which process)


I'd think that you could halt the locking by sending a keypress at regular intervals, so I'd suggest looking at WScript.SendKeys. Then put that in a loop with a sleep to make it send it regularly.

Just be careful about what key you're sending so you don't affect anything else though.