How to Disable Automatic Login for the Administrator Account?

June 25, 2025 2 answers
Asked by CuriousCoder83
I'm working with an automation file named 'autounattend.xml' where I've set up the administrator account to automatically log in using an AutoLogon configuration. However, I'm struggling to remove this automatic login feature after everything is set up. In my batch file 'instalador.bat', I've added commands to change the registry settings associated with automatic login. Despite executing these commands, the administrator account still logs in automatically without prompting for a password upon restarting. Can anyone advise me on the right way to completely disable automatic login for the administrator account?

Answers

TechSavvy99
It seems like you're relying on the built-in administrator, which can be tricky. Make sure to check the settings in your 'autounattend.xml' โ€” the lines `` and `` can cause unexpected behavior. If you're only looking to have the administrator account without any other accounts, consider simplifying your setup to avoid confusion. Also, modifying the registry might not be sufficient if the AutoLogon settings are still enabled elsewhere in the OOBE configuration. Double-check everything related to AutoLogon in your automation file.
Reply to this answer
InputGuru77
Honestly, using the built-in administrator account isn't always the best practice. But if you're set on using it, ensure there aren't any group policies or local security policies that may override your registry edits. You can also try setting `AutoAdminLogon` in your registry to '0' before your batch file runs. Lastly, running a full command to disable any leftover configurations in the registry might help.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions