JRVSInputs script for automating auto login on windows.
Code: Select all
REM Reg.exe documentation.
REM https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/reg-add
DISPMSG This automation will configure autologon.
WAITINPUT Press "enter" to continue.
DISPMSG Specify full username with domain.
SETVARI username
DISPMSG Specify user Password.
SETVARI password
playInteS cmd.exe
delay .3
REPEATS 1 reg.exe delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /f|enter
REPEATS 1 reg.exe delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /f|enter
REPEATS 1 reg.exe delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /f|enter
REPEATS 1 reg.exe delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /f|enter
REPEATS 1 reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /f /t REG_SZ /d 1|enter
REPEATS 1 reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /f /t REG_SZ /d %username%|enter
REPEATS 1 reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /f /t REG_SZ /d %password%|enter
DISPMSG Verify console or regedit for errors.
WAITINPUT Press "enter" to exit.