What's the fastest way to trigger your screensaver? (Windows 7)

  • AllenP

    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?

  • Answers
  • uSlackr

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

  • Nivas

    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)

  • Zoredache

    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

  • Diogo

    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!

  • Leaf

    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: http://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.

  • Related Question

    How to get a screensaver at the Windows 7 login screen?
  • AlexV

    I'm using Windows 7 Ultimate 64-bit. Since a couple of weeks, I no longer have a screensaver on the Windows login screen. If a user logs and then lock his session, the screensaver will start eventually but if no user are logged the login screen will never start the screensaver.

    Anyone know how to set a screensaver there?

  • Related Answers
  • Ivo Flipse

    I'm not 100% sure if these steps will work if someone isn't logged on though!

    To enable the screensaver, first choose the screensaver you want. Look in C:\WINDOWS\SYSTEM32 for files with the .SCR extension - typically there are the following (at least on my Enterprise Installation)...

    • SSTEXT3D - 3D Text
    • BUBBLES.SCR - Bubbles
    • MYSTIFY.SCR - Mystify
    • RIBBONS.SCR - Ribbons

    One of the things to be aware of is that you don't appear to have Direct3D support at the logon screen so the builtin screensavers above won't work. Unless you have another file you might want to grab the LOGON.SCR file from an earlier operating system.

    Once you have your screensaver (in my case LOGON.SCR), open your registry editor and navigate to the following key -

    HKEY_USERS \ .Default \ Control Panel \ Desktop

    alt text

    Below this key create the following REG_SZ values...

    ScreenSaveActive = 1
    ScreenSaveIsSecure = 0
    ScreenSaveTimeOut = 60 (or whatever timeout you want in seconds)

    That's it - you'll have your screensaver at the logon screen then.

  • DanMan32

    Actually, for Windows 7/Server 2008, if you compare the registry values in the same relative key location under YOUR hive, it is ScreensaveRIsSecure. You may find yours to be 0 but references in other posts indicate it should be 1