Contains the solution to this question:
How do I set up VMWare Workstation (running on a Windows host) to automatically suspend all guest VM's when the host OS shuts down or restarts?
This repo essentially contains a solution to the annoying issue of losing your virtual machine state if Windows decides to log off and/or reboot. It does this by running the script when it detects certain events associated with a logout.
While this feature does exist in VMWare, you have to convert your VM into a Shared VM, which involves losing a lot of features. This doesn't have that drawback. The original solution was published by @drueter on the VMWare Community forum.
- Download the repo as a zip and unzip it
- Right click
install.bat
and Run as Administrator
That's it.
You should have something similar to the picture below if you examine the create task in the task list. See the old manual install for details, if you are interested.
After a long and bumpy road through both StackExchange and the VMWare Community Forums I finally was given a hint to a useful thread that contained exactly what I was interested in.
But as that was kind of hidden and in a form that is hard to contribute to if you find bugs in the solution, I decided to improve on this situation by dumping the solution on GitHub. That fixes troublesome copy-paste issues.
Most errors (5, 7, 8, 9) are caused by not following the instructions, resulting in encoding issues when copy-pasting the contents of the xml file manually. That is why I advocate downloading the zip file to avoid this issue. See the above issues for a simple fix using Notepad.