Post

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:

  1. Download SysInternals

  2. Start a privileged cmd.exe

  3. 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

  1. This will start a new cmd.exe with “nt authority\system”. Use “whoami” to check that

  2. Let’s first delete the service:

sc delete WLMS

  1. Now open regedit.exe

  2. Go to: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WLMS and delete the whole key

  3. Reboot your system

There you go! The system will no longer bother you with sudden shutdowns!

This post is licensed under CC BY 4.0 by the author.