Last active
January 18, 2024 20:27
-
-
Save suuhm/e4d34d987b0b88b9d4cce6b8169b8b2e to your computer and use it in GitHub Desktop.
WLMS-Disabler : Disable and prevent the forced Shutdown on not licensed Windows Server and Client , Win 8 to win 11 , Server 2022 supported / https://github.com/suuhm/Powershell-Scripts-Collection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET mypath=%~dp0 | |
echo %mypath:~0,-1% | |
pushd %~dp0 | |
echo\ | |
REM popd | |
REM !!! YOU NEED PSEXEC !!! | |
REM DOWNLOAD zip package incl psexec: | |
REM: https://github.com/suuhm/Powershell-Scripts-Collection | |
cls | |
echo ***************************** | |
echo *** WINDOWS WLMS DISABLER *** | |
echo *** (c) 2023 suuhm *** | |
echo ***************************** | |
echo\ | |
REM Check for system user: | |
whoami | find "system" >nul | |
if %errorlevel% == 1 ( | |
REM -i -d for interactive new window | |
echo * Become System user by Psexec. | |
.\PsExec.exe -accepteula -nobanner -s cmd /k "call %~dpnx0" | |
) else ( | |
whoami | |
echo\ | |
echo * ^(Deleting^) Deactivating WLMS service. | |
REM sc delete wlms | |
sc config "WLMS" start=disabled | |
echo\ | |
echo * Adding Registry Values. | |
reg add HKLM\SYSTEM\CurrentControlSet\Services\WLMS /v Start /t REG_DWORD /d 4 /f | |
exit /B | |
) | |
echo\ | |
echo * Done, Press any key to exit now and reboot your pc. | |
pause>nul |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment