You can do this:
- Save the script below as AutoLogon.bat. The .bat file extension is essential.
- Double-click AutoLogon
- Select I for Install, R for Remove
- Enter your curren password.
If this solves your problem then please remember to mark my reply by clicking "Did this solve your problem?". It's your way of saying "Thank you".
@echo off
goto Start
Enable or disable AutoLogon on machines where
netplwiz no longer works.
9.12.2020 FNL
:Start
set Mode=
set /p Mode=Install or Remove AutoLogon (I/R)
if /i "%Mode%"=="" goto :eof
if /i "%Mode%"=="I" goto Install
if /i "%Mode%"=="R" goto Remove
goto Start
:Install
set /p PW=Password:
if "%PW%"=="" goto :eof
echo Installing AutoLogon for "%UserName%"
echo> "%temp%\AutoLogon.reg" Windows Registry Editor Version 5.00
echo.>>"%temp%\AutoLogon.reg"
echo>> "%temp%\AutoLogon.reg" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
echo>> "%temp%\AutoLogon.reg" "DefaultUserName"="%UserName%"
echo>> "%temp%\AutoLogon.reg" "DefaultPassword"="%PW%"
echo>> "%temp%\AutoLogon.reg" "AutoAdminLogon"="1"
"%temp%\AutoLogon.reg"
goto :eof
:Remove
echo Removing AutoLogon
echo> "%temp%\AutoLogon.reg" Windows Registry Editor Version 5.00
echo.>>"%temp%\AutoLogon.reg"
echo>> "%temp%\AutoLogon.reg" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
echo>> "%temp%\AutoLogon.reg" "DefaultUserName"=-
echo>> "%temp%\AutoLogon.reg" "DefaultPassword"=-
echo>> "%temp%\AutoLogon.reg" "AutoAdminLogon"="0"
"%temp%\AutoLogon.reg"