Prevent Windows Reboots on Expired VMs
Sometimes you have one of those VMs that you downloaded from Microsoft and then you used it for some testing. Now, after a certain amount of time, the free license given will expire and what will happen, is the VM will start to automatically shutdown I think after an hour. So how do we prevent this from happening?
The solution is easy:
Download SysInternals
Start a privileged cmd.exe
Navigate to SysInternals directory and run PsExec as following:
psexec64.exe -i -d -s cmd.exe
Or using NirSoft’s AdvancedRun:
AdvancedRun.exe /EXEFilename cmd.exe /RunAs 4 /Run
This will start a new cmd.exe with “nt authority\system”. Use “whoami” to check that
Let’s first delete the service:
sc delete WLMS
Now open regedit.exe
Go to: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WLMS and delete the whole key
Reboot your system
There you go! The system will no longer bother you with sudden shutdowns!