User Tools

Site Tools


Sidebar

General

Namespaces

guides:windows:prevent_windows_auto_lock

Prevent Windows auto-lock

A lot of companies have policies that dictates some specific behavior of their computers. Probably the most common is locking screen after a few minutes. I'm not saying that this is bad, this is very good policy, but sometimes it might be irritating, especially when you just want to keep track of what's happening on the screen while working on another PC. Do you want to disable it? No way, it's set by the company's administrator so it can't be changed, but there's another method.

To prevent Windows from locking, you need to fake your presence. This can be easily done through a simple VBS I found on Stack Overflow.

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

Download this file, run it, and that's all. Really. Nothing more to do. This script sends two, quick Scroll Lock keystrokes every one minute. The only caveat is stopping the script, and you must do this through a command line:

taskkill /IM wscript.exe
guides/windows/prevent_windows_auto_lock.txt · Last modified: 2019/08/10 01:05 by itachi