Skip to content

Instantly share code, notes, and snippets.

@w25r
Created October 28, 2015 14:56
Show Gist options
  • Save w25r/01144e213885a1ef5b6a to your computer and use it in GitHub Desktop.
Save w25r/01144e213885a1ef5b6a to your computer and use it in GitHub Desktop.
A simple VBScript that will stop a computer from going to screen saver or lock screen
' Multiple references were used to create this, but the closest is:
' https://gallery.technet.microsoft.com/scriptcenter/Stop-locking-computer-by-3d6e2ac2
Set ws = WScript.CreateObject("WScript.Shell")
Do
'Every 10 minutes should do
Wscript.Sleep (1000 * 60 * 10)
ws.sendkeys("{NUMLOCK}{NUMLOCK}")
Loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment