by YiMeng » Wed Sep 15, 2021 1:17 pm
Ah ha, perfect, this would avoid traversing deep in the regedit to set autoadminlogon everytime.
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.
Ah ha, perfect, this would avoid traversing deep in the regedit to set autoadminlogon everytime.
[url=https://jrvs.in/forums/viewtopic.php?f=34&t=3]JRVSInputs [/url] script for automating auto login on windows.
[bbvideo]https://youtu.be/gmdsoFWfRHI[/bbvideo]
[code]
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.
[/code]