Vmrun batch file execution: Difference between revisions
Jump to navigation
Jump to search
(How to use vmrun to execute batch files in Windows Guests) |
(No difference)
|
Revision as of 20:41, 8 December 2008
In order to use vmrun to run a batch file on a Windows guest, you can use RunProgramInGuest and explicity call cmd.exe with the /c switch.
vmrun -T ws -gu USERNAME -gp PASSWORD runProgramInGuest "C:\Virtual Machines\WinXP2\WinXP2.vmx" %COMSPEC% "/c C:\batch.bat"
This command will issue %COMSPEC%, which is a pointer to cmd.exe, to run the batch file C:\batch.bat on the WinXP2 virtual machine.