diff --git a/tools/.gitignore b/tools/.gitignore index fff6965..383871c 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -13,4 +13,5 @@ !prompt-user.exe !SFTA.exe !minibrowser.exe +!thinclient.exe diff --git a/tools/disable-thinclient.cmd b/tools/disable-thinclient.cmd new file mode 100644 index 0000000..826e9b9 --- /dev/null +++ b/tools/disable-thinclient.cmd @@ -0,0 +1,34 @@ +@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 ####### diff --git a/tools/logonalt.cmd b/tools/logonalt.cmd deleted file mode 100644 index 30f897f..0000000 --- a/tools/logonalt.cmd +++ /dev/null @@ -1,6 +0,0 @@ -@echo off - -:RDPLOOP -start /WAIT mstsc.exe -goto :RDPLOOP - diff --git a/tools/logonalt.vbs b/tools/logonalt.vbs deleted file mode 100644 index 8b5d28d..0000000 --- a/tools/logonalt.vbs +++ /dev/null @@ -1,3 +0,0 @@ -Set LogonScript = CreateObject("WScript.Shell") -LogonScript.Run "%SystemDrive%\tools\logonalt.cmd", 0, False - diff --git a/tools/setup-rdpclientmode.cmd b/tools/setup-thinclient.cmd similarity index 55% rename from tools/setup-rdpclientmode.cmd rename to tools/setup-thinclient.cmd index 0f15a27..7b32f1e 100644 --- a/tools/setup-rdpclientmode.cmd +++ b/tools/setup-thinclient.cmd @@ -1,29 +1,29 @@ @echo off set TOOLS=c:\tools -set RDPUSER=RDP -set RDPPASS=a024b1b5f67a4866af17e5fdd1168b7d +set THINUSER=THINCLIENT +set THINPASS=a024b1b5f67a4866af17e5fdd1168b7d echo ####### %0 ####### -echo Changing shell to MSTSC.EXE ... +echo Changing shell to THINCLIENT.EXE ... reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^ /v Shell /t REG_SZ /d "cmd.exe /C %TOOLS%\logonalt.vbs" /f 2>/nul -echo Creating user %RDPUSER% ... -net user %RDPUSER% %RDPPASS% /ADD +echo Creating user %THINUSER% ... +net user %THINUSER% %THINPASS% /ADD -echo Activating Auto Logon for user %RDPUSER% ... +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 reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^ - /v DefaultUsername /t REG_SZ /d "%RDPUSER%" /f 2>/nul + /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 "%RDPPASS%" /f 2>/nul + /v DefaultPassword /t REG_SZ /d "%THINPASS%" /f 2>/nul echo. -echo Please REBOOT NOW +echo Please REBOOT NOW. echo. echo ####### %0 ####### diff --git a/tools/thinclient.cmd b/tools/thinclient.cmd new file mode 100644 index 0000000..aabcb5e --- /dev/null +++ b/tools/thinclient.cmd @@ -0,0 +1,6 @@ +@echo off + +:THINLOOP +start /WAIT thinclient.exe +goto :THINLOOP + diff --git a/tools/thinclient.exe b/tools/thinclient.exe new file mode 100644 index 0000000..609606e Binary files /dev/null and b/tools/thinclient.exe differ diff --git a/tools/thinclient.vbs b/tools/thinclient.vbs new file mode 100644 index 0000000..eeea057 --- /dev/null +++ b/tools/thinclient.vbs @@ -0,0 +1,3 @@ +Set LogonScript = CreateObject("WScript.Shell") +LogonScript.Run "%SystemDrive%\tools\thinclient.cmd", 0, False +