How do I lock the screen for Windows 8 in a virtual machine?

Aha, you noticed that when running Windows 8 in a virtual machine the lock-screen shortcut, logokey+L, locks the host system as well as the guest system. This is true for VMware Player and Oracle Virtualbox.

This shortcut is intercepted by both the host and the guest and you have to sign in to both to get back. It is a very convenient and quick way to blank the screen when you need to leave the computer.image

To lock just the virtual machine here is the long way: Press the logokey, then click on your name in the upper right and click Lock.

If you are mostly working in the desktop you can also place a shortcut on the desktop to allow locking with just a double-click on an icon.

Here is the procedure for setting up a desktop lock shortcutimage

  • Right-click on a free space on the desktop.
  • Click New and in the secondary menu, click Shortcut.
  • In the Create a Shortcut dialog, enter this text: shutdown /l – the word “shutdown” followed by a space then a slash and a lower-case L. Don’t worry, this command will not shut down the system just lock the screen.
  • Click Next.
  • Replace the default shortcut name “shutdown” with lock or lock screen for the name of the shortcut.
  • Click Finish.

image

image

imageYou now have an shortcut on the desktop that looks about as shown here. For a better looking icon, right-click the shortcut, click Properties, then  click Change icon. Click OK in the complaint dialog.image

An icon selection dialog opens. imageClick the one you like. I like the padlock symbol.

Click OK to close the Change Icon dialog.

Click on Normal window in the Run box and click on Minimized. This will prevent the command box from flashing on the screen when the icon is double-clicked.

imageClick OK to close the Properties dialog.

You now have a nice looking “lock screen” icon.

To lock the screen, just double-click this shortcut. Only the guest system will be locked down, your host system will not have to be unlocked.

.:.

© 2012 Ludwig Keck

Advertisement

6 thoughts on “How do I lock the screen for Windows 8 in a virtual machine?

    • Locking the screen will show a background image and you will be required to enter your password to resume operating. So, yes, it logs you off. If it didn’t the computer would not be locked.

      • Logging off shuts down all the applications. Locking does not. There’s a significant difference you are not addressing with your solution. The “shutdown” command does not appear to have a “lock” option/switch associated with it. I was looking for a server 2012R2 solution. The best option I’ve seen for that is to hit the logo/windows key and then click on your user name and then select Lock. Not sure if that works on other platforms or across all Windows installs or not.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s