VMware {code} Community
RockyConcept
Contributor
Contributor

Running .bat file ( script) inside VM

I am writing a application using vSphere SDK to start the VM on ESX and run a script inside the VM.

I am able to start the VM but not sure how to run scipts inside VM. Any inputs would be of great help.

Note: I do have the VMWare Tools as part of VM.

0 Kudos
1 Reply
BenBerry
Contributor
Contributor

The tool you're looking for is the VIX API, which lets you do what you need inside of a guest.

In this case, you'll want the VixVM_RunScriptInGuest method (that's what it's called in the C version of the API; if you choose to use the Perl or COM versions, there will be a similarly named method that does the same thing).

0 Kudos