Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example, like I can press Win+L to lock my computer, can I press Win+(something) to start my screensaver? I'd like it to be just like if it starts automatically, where it will show lock screen on resume, etc.

share|improve this question
As far as I can remember, each screensaver has executable module. Did you try to start it manually? – Maximus Jul 20 '12 at 23:48
up vote 4 down vote accepted

There are several ways to achieve this:

  • A simple shortcut – as Peter Maxwell suggested – will do. To lock the workstation on resume, just make the shortcut point to the following:

    cmd /c start /wait scrnsave.scr /s && rundll32 user32.dll,LockWorkStation

    Note that you cannot specify the Win key as part of the keyboard shortcut. Windows only allows Ctrl + Alt as modifier.

    This has also the drawback of locking the workstation after the screensaver has ended, which allows a short glimpse at the desktop.

  • Download NirCmd, execute nircmd.exe inside the archive and click Copy To Windows Directory.

    Now, create a shortcut pointing to the following:

    cmd /c nircmd lockws && nircmd cmdwait 1000 screensaver

    This will start the screensaver 1000 ms after the screen has been locked, which is more secure.

    NirCmd will always launch the default screensaver (which may or may not be what you want).

  • If you insist in the Win key for the keyboard shortcut, you can use AutoHotkey:

    1. Download and install the latest version.

    2. Save one of the following scripts as screensaver.ahk, using your favorite text editor:

          RunWait, scrnsave.scr /s
          Run, rundll32 user32.dll`,LockWorkStation
          Run, nircmd lockws
          Run, nircmd cmdwait 1000 screensaver
    3. Double-click the file to run the script.

    4. (optional) Copy the script (or a link to it) in the Startup folder.

    Pressing Win + S (# represents the Win key) will have the same effect as executing the corresponding shortcut from the previous items.

share|improve this answer

Create a shortcut to C:\Windows\System32\scrnsave.scr then assign a shortcut key in Properties.

scrnsave.scr is a black screensaver, choose another scr file for the screensaver you wish to load.

Source of information

share|improve this answer
That just gives me a black screen that doesn't lock my computer. Also, no key shortcuts will work on it (even though they show up under properties). My screensaver is the text one that shows the time and spins. – Frank Jul 20 '12 at 23:51

There's a LifeHacker article titled PushMonitOff Links Hot Key Combo to Monitor Power Switch about a tiny app which will turn your monitor off via a configurable hot key combination. As mentioned in the article, the app can be downloaded from here.

Alternatively, you could use the AutoHotKey utility with a simple script to do what you want. Here's the one I currently use which just turns the monitor off (it doesn't lock the computer because I've commented-out the second line that would have done that):

^#l:: ; ctrl+winkey+l
;SendInput #l ; lock the computer (not currently enabled)
Sleep 1000 ;  Give user a chance to release keys (in case their release would wake up the monitor again)
SendMessage, 0x112, 0xF170, 2,, Program Manager
; Note for the above: Use -1 in place of 2 to turn the monitor on.
; Use 1 in place of 2 to activate the monitor's low-power mode.
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .