2024-01-30 15:07:50 +01:00
|
|
|
@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
|
2024-01-30 21:18:10 +01:00
|
|
|
rd /S /Q %PARENT%%THINUSER% 2>nul
|
|
|
|
|
|
|
|
echo Enabling Lockscreen function ...
|
|
|
|
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^
|
|
|
|
/v DisableLockWorkstation /t REG_DWORD /d "0" /f 2>/nul
|
|
|
|
|
|
|
|
echo Enabling fast User switching ...
|
|
|
|
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" ^
|
|
|
|
/v HideFastUserSwitching /t REG_DWORD /d "0" /f 2>/nul
|
2024-01-30 15:07:50 +01:00
|
|
|
|
|
|
|
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 #######
|
2024-01-30 17:20:24 +01:00
|
|
|
|