VMware {code} Community
Vikashtalanki
Contributor
Contributor

Executing a batch file in a VM from GuestCustomizationSection through Java API

Hi ,

My task is to run a batch file that installs something in a VM through Java API.

I am populating the CustomizationScript  section with the batch file content through a Java Pgm.

Inorder to install this batch file I need to give the command 'batchfile.bat mode driveName' (example : batchfile.bat install/remove C: ) which installs/removes something in/from the driveName. How can I pass these parameters( mode, drive name etc) to the VM through the Java API so that when the VM is powered on or Force Recustomized , it executes the customization script with these parameters.

Also let me know if there is any other better way around.

NOTE : the batch file is in my local machine. I need to either copy its content to CustomizationScript section or send the whole file to VM.

TIA,

VIkash

Reply
0 Kudos
0 Replies