Last week, I was suddenly unable to lock my Windows 7 workstation. Windows+L stopped working, as did the “Lock” command in the Shutdown menu. I did a quick search online and found articles pointing to various registry settings, for example, http://www.howtogeek.com/howto/windows-vista/disableenable-lock-workstation-functionality-windows-l/.
Unfortunately, I couldn’t find any of the registry keys listed and I was quickly getting frustrated logging off my machine every time I walked away.
Enter Process Monitor. I fired it up with the default filter, and captured a few seconds of me hitting Windows+L over and over again. It was all very scientific. I then stopped the trace and spent a minute or two combing through it.
In the snippet above, we see a highly suspect registry value being read:
A quick check with Regedit shows that the data in DisableLockWorkstation was set to 1. I set the data to 0, and was immediately able to lock my machine again.
Apparently, there are a few locations where DisableLockWorkstation can be read from; using Process Monitor can help track down the right location. Of course, I don’t know how this value got set in the first place but I’ll watch out for it in the future.