VMware Communities
pumichat
Contributor
Contributor

How to run a command in vmware using vmrun?

How to run a command in vmware using vmrun?

I'm able to run .bat/.sh on guest machine.

But what I want is , in guest vm, to open cmd and echo TEST for example.

This is a command I use but not successful so far

vmrun -T ws -gu [username] -gp [password] runProgramInGuest xxx.vmx -activeWindow -interactive cmd.exe "echo TEST"

 

Can anyone suggest me how to do this? 

0 Kudos
1 Reply
louyo
Virtuoso
Virtuoso

I run this from terminal in Linux host and it works. 

vmrun -T ws -gu <you> -gp <yourpw> runProgramInGuest  "full path to the vmx file" -activeWindow -interactive "C:\windows\system32\cmd.exe" "/K echo whatever"

Lou

0 Kudos