13.0

Table Of Contents
vmrun -gu guestUser -gp guestPassword runProgramInGuest Win10.vmwarevm/Win10.vmx
-interactive cmd.exe
n Start the command tool on a Windows guest as an active window on the desktop.
vmrun -gu guestUser -gp guestPassword runProgramInGuest Win10.vmwarevm/Win10.vmx
-activeWindow -interactive cmd.exe
n Run a script on a Windows guest, with Perl as the script interpreter. Two separate examples
follow.
vmrun -gu guestUser -gp guestPassword runScriptInGuest Win10.vmwarevm/Win10.vmx
-interactive "C:\perl\bin\perl.exe" "system('notepad.exe');"
vmrun -gu guestUser -gp guestPassword runScriptInGuest Win10.vmwarevm/Win10.vmx
-interactive "" "C:\perl\perl.exe C:\script.pl"
n Run a batch script and keep running afterwards. To use cmd.exe on Windows, you must
specify the script interpreter as null.
vmrun -gu guestUser -gp guestPassword runScriptInGuest Win10.vmwarevm/Win10.vmx ""
"cmd.exe /k \"C:\\Program Files\\Microsoft Visual Studio\\VC\\vcvarsall.bat\" x86"
n Run a Bash shell script file or Perl script on a Linux guest.
vmrun -gu guestUser -gp guestPassword runScriptInGuest Ubuntu16.vmwarevm/
Ubuntu16.vmx -interactive "" "/bin/bash myscript"
vmrun -gu guestUser -gp guestPassword runScriptInGuest Ubuntu16.vmwarevm/
Ubuntu16.vmx -interactive "/usr/bin/perl" "system('firefox');"
n Start an X clock on a Linux guest, which requires the -display option to appear on the
console.
vmrun -gu guestUser -gp guestPassword runProgramInGuest Ubuntu16.vmwarevm/
Ubuntu16.vmx /usr/bin/xclock -display :0
n Run the same X clock command, but return control back to the console immediately.
vmrun -gu guestUser -gp guestPassword runProgramInGuest Ubuntu16.vmwarevm/
Ubuntu16.vmx -noWait /usr/bin/xclock -display :0
n Run Firefox.
vmrun -gu guestUser -gp guestPassword runProgramInGuest Ubuntu16.vmwarevm/
Ubuntu16.vmx /usr/bin/firefox --display=:0
n Setting the guest environment with the guestEnv parameter requires root permission on Linux
because the change affects subsequent commands issued by other users.
vmrun -gu guestUser -gp guestPassword writeVariable Ubuntu16.vmwarevm/Ubuntu16.vmx
guestEnv SRC tmp.example.com:1666
n List processes in a Linux guest and end the process numbered 8192.
Using VMware Fusion
VMware, Inc. 203