From 28b5f3efe00f2f98f4ba3a5d70d22bc60a4a2256 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Tue, 30 Jan 2024 21:18:10 +0100 Subject: [PATCH] bugfix --- tools/disable-thinclient.cmd | 9 +++++++++ tools/setup-thinclient.cmd | 12 ++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/tools/disable-thinclient.cmd b/tools/disable-thinclient.cmd index dd9e6f2..101c302 100644 --- a/tools/disable-thinclient.cmd +++ b/tools/disable-thinclient.cmd @@ -15,6 +15,15 @@ reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^ echo Deleting user %THINUSER% ... net user %THINUSER% /DELETE +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 echo Disabling Auto Logon for user %THINUSER% ... reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^ diff --git a/tools/setup-thinclient.cmd b/tools/setup-thinclient.cmd index 5860588..8f85646 100644 --- a/tools/setup-thinclient.cmd +++ b/tools/setup-thinclient.cmd @@ -1,7 +1,6 @@ @echo off set TOOLS=c:\tools set THINUSER=THINCLIENT -set THINPASS=a024b1b5f6 echo ####### %0 ####### @@ -10,11 +9,16 @@ reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^ /v Shell /t REG_SZ /d "%TOOLS%\thinclient.exe" /f 2>/nul echo Creating user %THINUSER% ... -net user %THINUSER% %THINPASS% /ADD +net user %THINUSER% "" /ADD -reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" ^ +echo Disabling Lockscreen function ... +reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^ /v DisableLockWorkstation /t REG_DWORD /d "1" /f 2>/nul +echo Disabling fast User switching ... +reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" ^ + /v HideFastUserSwitching /t REG_DWORD /d "1" /f 2>/nul + echo Activating Auto Logon for user %THINUSER% ... reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^ /v AutoAdminLogon /t REG_SZ /d "1" /f 2>/nul @@ -23,7 +27,7 @@ reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^ /v DefaultUsername /t REG_SZ /d "%THINUSER%" /f 2>/nul reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^ - /v DefaultPassword /t REG_SZ /d "%THINPASS%" /f 2>/nul + /v DefaultPassword /t REG_SZ /d "" /f 2>/nul echo. echo Please REBOOT NOW.