A while back I wrote an article about a registry tweak you could make in Windows 10 that disabled the lock screen; this forced Windows 10 to show only the login screen when the workstation was locked, and allowed PTFB Pro’s special “Unlock computer to press targets” feature to do its thing. BTW, if you weren’t even aware that PTFB had such a thing, check it out. You’ll find the feature in Options -> Configure; it enables PTFB to very briefly unlock a workstation to handle a screen that’s waiting for a response, then automatically relock your computer afterwards. It’s a great way to keep things running smoothly on your machine when you’re not in attendance.
Anyway, it’s now (finally) come to my attention that the Anniversary Update to Windows 10 broke the registry tweak, bringing the lock screen right back and in your face. Happily there is a new registry tweak that once again keeps that pesky (and in my opinion, largely redundant) lock screen from getting in the way; less happily, Windows 10 keeps resetting the tweak behind your back.
A guy called Sergey Tkachenko on the WinAero site wrote an article showing how to get Windows’ built-in Task Scheduler to reapply the registry tweak as often as necessary to keep the lock screen at bay. It’s an elegant solution, and for your convenience I’ll include the guts of the procedure here.
- Open up Task Scheduler (just type “Task Sched” into the search box on your taskbar; it should be the top find)
- Choose “Create Task…” from the right-hand “Actions” pane. (Note it is “Create Task” you want, rather than “Create Basic Task”)
- On the General tab of the resulting Create Task dialog, give your new task a meaningful name, tick the option marked “Run with highest privileges” and choose “Windows 10” from the “Configure for” dropdown list.
- Switch to the Triggers tab and two new triggers: “At logon” and “On workstation unlock”. Set them both to fire for “Any user” and take the defaults for everything else.
- Switch to the Actions tab, and set “reg.exe” as the program, then paste the following into the “Add Arguments” field (all one line):
add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\SessionData /t REG_DWORD /v AllowLockScreen /d 0 /f
- On the Conditions tab, you may wish to turn OFF the two power options that restrict the task to AC power if you’re using a portable device.
- Click OK to save your changes, then select your new task and choose “Run”from the actions pane to run it once.
The registry tweak that disables the lock screen (a setting “AllowLockScreen” with a value of zero) has now been applied. The next time you lock your PC, the lock screen won’t appear; instead you’ll just see the login screen. When you sign into your PC to unlock it, Windows will undo the registry tweak, but then the task will run (remember the “On workstation unlock” trigger?) and set it right back.
I’m going to try adding this tweak to PTFB Pro’s workstation unlock service component; if successful, the next release of PTFB will render the above lock screen task unnecessary. For right now however, the above process is an effective and elegant workaround.