From 138b1b1ef6542376eede06fb0e9cf60cab00adb6 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Wed, 31 Jan 2024 14:14:46 +0100 Subject: [PATCH] bugfixing --- tools/{autologon.cmd => setup-autologon.cmd} | 2 +- tools/{autologon.ps1 => setup-autologon.ps1} | 0 tools/setup-servermode.cmd | 38 ++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) rename tools/{autologon.cmd => setup-autologon.cmd} (67%) rename tools/{autologon.ps1 => setup-autologon.ps1} (100%) create mode 100644 tools/setup-servermode.cmd diff --git a/tools/autologon.cmd b/tools/setup-autologon.cmd similarity index 67% rename from tools/autologon.cmd rename to tools/setup-autologon.cmd index a39d276..095464c 100644 --- a/tools/autologon.cmd +++ b/tools/setup-autologon.cmd @@ -4,7 +4,7 @@ set TOOLS=c:\tools echo ####### %0 ####### echo Activating Auto Logon for a user ... -powershell -command %TOOLS%\autologon.ps1 +powershell -command %TOOLS%\setup-autologon.ps1 echo ####### %0 ####### diff --git a/tools/autologon.ps1 b/tools/setup-autologon.ps1 similarity index 100% rename from tools/autologon.ps1 rename to tools/setup-autologon.ps1 diff --git a/tools/setup-servermode.cmd b/tools/setup-servermode.cmd new file mode 100644 index 0000000..7e53ad7 --- /dev/null +++ b/tools/setup-servermode.cmd @@ -0,0 +1,38 @@ +@echo off +set TOOLS=c:\tools + +echo ####### %0 ####### + +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 Disabling Startmenu power button ... +reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" ^ + /v StartMenuLogoff /t REG_DWORD /d "0" /f 2>/nul + +echo Disabling Power opions ... +reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" ^ + /v shutdownwithoutlogon /t REG_DWORD /d "0" /f 2>/nul + +reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Start\HideShutDown" ^ + /v "value" /t REG_DWORD /d 1 /f 2>nul + +reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Start\HideRestart" ^ + /v "value" /t REG_DWORD /d 1 /f 2>nul + +reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Start\HideHibernate" ^ + /v "value" /t REG_DWORD /d 1 /f 2>nul + +reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Start\HideSleep" ^ + /v "value" /t REG_DWORD /d 1 /f 2>nul + +reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Start\HidePowerButton" ^ + /v "value" /t REG_DWORD /d 1 /f 2>nul + +echo ####### %0 ####### +