In Windows, how do I lock my workstation without logging off?
In Windows 7, Vista, and XP, you can lock your workstation manually or by using your screen saver.
Note: The following may not cover all methods or variables pertaining to your computer, such as whether Fast User Switching is enabled or disabled. For details, see Microsoft Support; e.g., for Windows XP, see article 294317.
Search Microsoft Help and Support.
On this page:
- Manually locking your computer
- Locking your computer through the screen saver
- Unlocking your computer
Manually locking your computer
Four methods are available for manually locking your computer:
Method 1
To immediately lock your computer, simultaneously press the Windows
logo key (typically beside the Spacebar) and the
l key (the letter L).
Method 2 (Windows Vista in non-Classic mode only)
In the Start menu, click the lock icon.
Method 3
Press Ctrl-Alt-Del, and then click Lock this
computer or Lock Computer.
Method 4
To create a desktop shortcut that will lock your computer when you double-click it:
- Right-click the desktop, select
New, and thenShortcut. This will open the Create Shortcut Wizard.
- For the location of the item, type: %windir%\System32\rundll32.exe user32.dll,LockWorkStation
- Click
Next.
- Type an appropriate name for this shortcut, and then click
Finish.
You will now have a shortcut on your desktop that will lock your computer when you double-click it.
Locking your computer through the screen saver
To set up your screen saver to automatically lock your computer:
- In Windows 7 and Vista, right-click the desktop, and then select
Personalize. In earlier versions, right-click the desktop, and then selectProperties.
- In Windows Vista, the
Personalizationwindow will be open. SelectScreen Saver.In Windows XP, the
Display Propertieswindow will be open. Select theScreen Savertab. - From the drop-down list, select a screen saver file.
- In the "Wait:" field, set the amount of time you want the screen
saver to wait for activity before starting.
- Depending on your version of Windows, check the appropriate box:
-
On resume, display logon screen -
On resume, password protect -
Password protected
Click
OK. From now on, when the screen saver comes on, your workstation will be locked. -
Unlocking your computer
Regardless of how you lock your computer, to unlock it, press
Ctrl-Alt-Del. A window will appear where you can enter
the password for the username under which you're logged in.
Administrators for either the local computer or the domain can unlock a locked computer by entering their usernames and passwords at the login prompt. This will log the current user out, but will not log the administrator in. At this point, any user with login rights can log into the computer normally.
Note: If you are the local computer administrator, log into the local computer rather than the domain. Also, by using the administrator login to unlock the workstation, you will erase all unsaved work.
If your domain username is in the Administrators group, you can enter your domain name and domain password, and then select the proper domain from the drop-down list. You are not required to log into the local computer. This will also unlock the workstation and erase all unsaved work.

