Question

I am on the latest version of VMWare Workstation. In my VMWareTools I have configrued an individual script file (start.bat) to be started when the (guest) OS is booted. Unfortuantely it does not run when starting the guest system as intended.

  1. When pressing "run now" it works
  2. Running the script from CMD works as well
  3. I have changed the service (VMWareTools service) to run under different users - no success
  4. All Users (of the service) have had Administrator privileges

I have no idea what is going wrong. Maybe someone is having an idea ....

Was it helpful?

Solution 2

I had the power section of the VM mis-configured. From the documentation.

Power Off/Shut Down Guest — If set to Power Off, it turns off the active virtual machine like the power button on a hardware PC. The virtual machine is abruptly powered off, with no consideration for work in progress.

Similar scenario applies when Starting up. With the correct setting the script start. Once you know the answer -as always - it is so obvious. However, the other comment remains an interesting alternative.

Just a hint: When running the script, VMWare reported the script did not successfully run, which it did. Setting ERRORLEVEL = 0 at the end of the script avoids this issue.

OTHER TIPS

I did not get the VMWare Tools startup working, but the same script started via scheduler (IMHO the most convenient way to start a bat file after startup) works fine. Since scheduler offers an user interface it is easy to schedule the bat file, it even allows me to "run as" a specified user. BTW, I found this post How to check if a service is running via batch file and start it, if it is not running? here useful to decide whether a particular service is already running.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top