Ideally, I'd like to be able to press 1 button on my keyboard and have the screensaver come up, and not just a preview, but the actual screensaver such that when I try to access the computer it shows a login screen (as per my screensaver settings). I say this last part in particular because I don't want a shortcut to the "Preview" button, which doesn't seem to require me to log back in after the preview (which is contrary to my settings and what I'm looking for).

If a single button isn't possible (i.e. via some local mapping or keys or whatnot), perhaps a quick combination of keys?

If all else is not possible, it would be handy to be able to trigger my screensaver via a shortcut on my desktop.

Are any of these doable? If so, how?

  • 2
    People still use screen-savers? Commented Oct 8, 2011 at 8:20
  • @MarcGravell: Why not?
    – dmr
    Commented Oct 9, 2011 at 2:01
  • @dmr I (and many others) just set the monitor(s) to power down if not being used Commented Oct 9, 2011 at 7:02
  • 2
    @MarcGravell Some monitors take time to switch back from being powered down to an active state. Mine even switches the input signal, something I don't want, which is why I need a screen-saver.
    – slhck
    Commented Oct 10, 2011 at 6:07
  • @slhck fair enough! Commented Oct 10, 2011 at 6:23

7 Answers 7


Windows + L locks the screen immediately. Other than that, you'll need a utility to remap some other keystroke to that action.

  • +1 (if I could give it to you) That's also a useful one to know :)
    – AllenP
    Commented Oct 7, 2011 at 21:14
  • Other useful ones: Windows-M minimizes all windows; Windows-E brings up My Computer; Windows-R brings up the "run" dialog. Commented Oct 8, 2011 at 7:07
  • I've swapped Right Alt with the Windows key ages ago to be able to press this with a single hand. :) Commented Oct 8, 2011 at 16:46
  • 2
    I see 33 upvotes for an answer that doesn't trigger my screen saver. superuser.com/a/643410/128228 is a good answer. Commented May 11, 2015 at 19:10
  • 2
    The login screen is a side effect of the OP's settings. The title and bold faced text clearly speak of screen saver invocation. Google brought me here as I had the same question as in the title. This answer is misleading, although I see how it happened now. OP wanted to lock the computer, just as HIS screensaver does. It's a bass ackwards question. Commented May 17, 2015 at 0:09

Sometime before there was an article on howtogeek.com:

Create Icons to Start the Screensaver on Windows 7 or Vista:
Right-click on the desktop and choose New \ Shortcut from the menu In order to launch the screensaver, you’ll need to enter the full path to the screensaver file, followed by “/s”

%systemroot%\system32\Bubbles.scr /s

You would want to substitute the name of the screensaver where you see “Bubbles.scr” above. Also note that I used %systemroot% instead of C:\windows because not every install uses the C: drive.

If you don’t know the filename, you can browse down to your system32 folder and then search for “.scr” using the search box:

Not really one button, but one icon (and you can assign a keyboard shortcut) (and is hardcoded with the screensaver)


If you wish to lock your computer via a shortcut, then setup a shortcut like this.

  • Filename: Lock Screen.lnk
  • Target: C:\Windows\System32\rundll32.exe user32.dll, LockWorkStation
  • Icon path: %SystemRoot%\System32\shell32.dll
  • Icon Index: 47

You can even assign a shortcut key to the shortcut if you want.

lock shortcut

  • Expanding off Zoredache's answer, you could just create a shortcut directly to the screensaver. This would trigger the screensaver, and if you wait longer than the idle time you set for your screensaver, the computer will be locked should you try to return. The smallest keystroke combination you can use is 3 keys with this method, as far as I know.
    – stoicfury
    Commented Oct 8, 2011 at 0:44
  • 4
    -1 for trying to reinvent the wheel. Windows+L has done this since XP. Commented Oct 8, 2011 at 5:21
  • 8
    @Graeme Donaldson, I support a large number connecting to a terminal server. They don't have a Windows button to press. A portion of this large number of users also borders on technically illiterate, but they must be able to lock their computers. A shortcut on the desktop and pinned to the start menu and task bar make this easy for them. Also, not everyone likes to or is able to memorize a large number of keyboard shortcuts. The question also explicitly asked how to trigger via a desktop shortcut, I was simply answering the question that was asked, so I don't get the downvote.
    – Zoredache
    Commented Oct 8, 2011 at 19:27
  • You can lock from the Start menu in Windows 7. It's one of the options in the menu next to Shut down.
    – craig65535
    Commented May 10, 2016 at 17:40

The Mac has a functionality called hot corners, where when you move your cursor to a specified corner, the screen saver kicks in. This behavior can be duplicated in Windows 7 using an open source program called Hot Corners, which can be found here.

This would, I imagine, provide you with the fastest possible way to bring up your screensaver, as you wouldn't even have to reach for the keyboard.

Good luck!

  • I know of hot corners-like functionality from Compiz in Ubuntu. As a user of that, I can say it can get annoying to have hot corners, especially when overshooting a menu in the top left corner
    – TheLQ
    Commented Oct 13, 2011 at 1:07

I apologize for grave digging, but this page comes as a top search result for triggering a screensaver with a shortcut key. I thought it'd be useful to add another, updated method for doing something that few people seem to know how to do.

Note: This is a solution made for and tested on Windows 8 but should also work for Windows 7. There is a better solution for older OSes, however; check here: https://stackoverflow.com/questions/1430108/how-to-turn-screensaver-on-windows-7-by-a-code-in-cmd.

First, create a folder. Then, find a cmd.exe and copy it to the folder. Now, create a text file (don't worry about naming it yet) and paste the following code into it:

 using System;
 using System.Runtime.InteropServices;

public static class LockDesktop
 [DllImport("user32.dll", EntryPoint = "GetDesktopWindow")]
 private static extern IntPtr GetDesktopWindow();

 private static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);

 private const int SC_SCREENSAVE = 0xF140;
 private const int WM_SYSCOMMAND = 0x0112;

 public static void SetScreenSaverRunning()
     SendMessage(GetDesktopWindow(), WM_SYSCOMMAND, SC_SCREENSAVE, 0);

 public static void Main()

Now, click "save as" and set the file type to "all" before saving the file as "lock.cs". Make sure to save it to the folder you created. Finally, open the CMD.exe from the folder and type in the following command:

%SystemRoot%\Microsoft.NET\Framework\v3.5\csc.exe lock.cs

Press Enter and wait a moment. You'll now find a "lock.exe" file in your folder. You can create a shortcut (send to desktop) to it and go to properties to assign a keyboard shortcut.

**Note: This will simply launch your set screensaver as if the timer ran out. If you do not have it set to display logon screen at resume, it will not lock. There is also a delay of about five seconds before it locks since this is the default behavior of screensaver so that the user has time to cancel it from locking.

If you do not want to set your screen saver to lock on resume and/or want you computer to lock instantly with the shortcut, continue reading.**

Create another text file or use the old one, it doesn't matter. Now, enter the following batch code and save it as "lock.bat".

@START lock.exe
@%windir%\system32\rundll32.exe user32.dll,LockWorkStation

Now you can create a shortcut once again and give it a keyboard command.

  • 3
    Creating a copy of cmd is a very improper way of doing that. The quickest way would be to click empty space in Windows Explorer's breadcrumbs bar and type cmd <Enter>.
    – gronostaj
    Commented Jun 5, 2014 at 17:37

Haven't tried Hot Corners, but I've had very good results with a tiny little app called Summon the Screensaver. Just Google it to find the download. You can configure where you move the cursor to activate it, how long a delay before it kicks in, and other behaviors as well. I've used it in XP and 7, but don't know whether it works in 8.

  • dunno about the downvotes, worked for me...
    – meetar
    Commented Oct 8, 2014 at 20:51
  • as to Summon the SS: yeah, i googled it, and 90% of the results are about uninstalling it, removing it, completely uninstalling, etc. thanx, but no thanx...
    – user435820
    Commented Apr 8, 2015 at 23:17

Much easier way: open: This PC, OS (C:), windows, system 32. Then find a screen saver in this folder, bubbles, mystify, ribbons whatever. Right click, choose send to, pick desktop (make shortcut) Now you have a desktop shortcut to immediately start the screen saver

NOTE: This does not engage the "lock-screen" functionality that is engaged (optionally) through standard idling trigger of screen saver.

You must log in to answer this question.

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