문제

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

도움이 되었습니까?

해결책 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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top