Skip to content

Instantly share code, notes, and snippets.

@quark-zju
Created July 5, 2013 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quark-zju/5932871 to your computer and use it in GitHub Desktop.
Save quark-zju/5932871 to your computer and use it in GitHub Desktop.
Lock Windows.
rem Enable Win+L, Lock Windows, Disable Win+L.
rem Useful as a workaround to disable Win+L while being able to lock.
rem This makes sence if you are using Win+L for other purpose, for example, use Win+L inside a virtual Linux system.
rem Run this as Administrator. If it is annoying, try UAC Trust shortcut from www.itknowledge24.com
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableLockWorkstation /t REG_DWORD /d 0 /f
rundll32 user32.dll,LockWorkStation
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableLockWorkstation /t REG_DWORD /d 1 /f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment