What's the fastest way to lock your screen?
Windows + L locks the screen immediately. Other than that, you'll need a utility to remap some other keystroke to that action.
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.
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 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();
[DllImport("user32.dll")]
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()
{
LockDesktop.SetScreenSaverRunning();
}
}
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.