1. Open regedit.exe
2. Navigate to [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
3. Change the value of “WaitToKillServiceTimeout” to 1000
4. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
5. Double click ClearPageFileAtShutdown.
6. Change the value data to 0.
Close the Registry Editor.