Skip to content
Lock Windows workstation and put its monitors to sleep.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Properties
.gitattributes
.gitignore
LICENSE
LockAndSleep.cs
LockAndSleep.sln
LockAndSleep.userprefs
README.md
app.config
app.manifest

README.md

A basic utility to lock a Windows workstation and put its monitors to sleep.

Requires .NET Framework 4.6.1 or later.

Tested only on Windows 7.

How to use

  1. Save the executable in some convenient location.
  2. Create a desktop shortcut or similar.
  3. Add keyboard command to the shortcut (e.g. ctrl-alt-L).
  4. You're pretty much done.

Either activate the shortcut or use the keyboard command you added to it.

Rationale

All the ones by others I could find either did only one of these or added some unnecessary bloat everywhere.

This is a tiny utility that does exactly as advertised and not much more. And best of all, it doesn't stay resident in memory.

Presumably there's some cases when this fails to work, like if you're running a game, it might disable the keyboard shortcut, but I don't honestly care. Use apps that stay resident in memory to deal with that.

You can’t perform that action at this time.