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.
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 shortcut
- 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.
You 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.
An icon selection dialog opens. Click 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.
Click 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
it doesn’t lock; it logs off
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.
Thank you, Paul. I will try your approach when I recover – my host machine just crashed 😦
Just press Host+Del and then Enter 😉
Try creating a shortcut with this as the command line: rundll32.exe user32.dll, LockWorkStation