Sunday, November 9, 2014

How to prevent automatic login of the last user in Windows 10?


There was a pretty arcane hack that worked in Windows 8.1, but it doesn't work any more. Any suggestions?


Answer



The following works for me on Windows 10 Pro x64. It's particularly useful if some accounts don't have passwords.



  • Go into the Local Group Policy Editor (you can get there by searching the configuration panel)

  • In the navigation panel, click to expand the User Configuration -> Windows Settings -> Scripts (Logon/Logoff)

  • In the right panel, double click to open Logon (not Logoff!)

  • In the windows that opens, click on Add

  • In the Script Name field, input: C:\Windows\System32\reg.exe

  • In the Script Parameters field, input: ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\UserSwitch /V Enabled /T REG_dWORD /D 1 /F

  • Click OK and close the window

  • Restart the PC (logging out might also suffice)


Now when you login and go to shut down the PC, you will be greeted by the list of user names at the next boot.


I have confirmed this works on my Windows accounts, but only if you put the script at the Logon, not the Logoff, which used to work for Windows 8.x. What this does is change a registry key to enable the User Switch (sets it to 1). Apparently, this registry key gets reset (set back to 0) by another process (likely during logon) and this Policy puts it back to 1.


Source: Option Two of this Eight Forums tutorial


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...