w10install/tools/disable-thinclient.cmd
Michael H.G. Schmidt 2dd374a011 thinclient
2024-01-30 15:07:50 +01:00

35 lines
900 B
Batchfile

@echo off
set TOOLS=c:\tools
set THINUSER=THINCLIENT
set "FOLDER=%USERPROFILE%"
for /D %%D in ("%FOLDER%") do (
set "PARENT=%%~dpD"
)
echo ####### %0 #######
echo Changing shell to explorer.exe ...
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^
/v Shell /t REG_SZ /d "explorer.exe" /f 2>/nul
echo Deleting user %THINUSER% ...
net user %THINUSER% /DELETE
%TOOLS%\deltree %PARENT%%THINUSER%
echo Disabling Auto Logon for user %THINUSER% ...
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^
/v AutoAdminLogon /t REG_SZ /d "0" /f 2>/nul
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^
/v DefaultUsername /f 2>/nul
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^
/v DefaultPassword /f 2>/nul
echo.
echo Please REBOOT NOW.
echo.
echo ####### %0 #######