Having a hard time with this one. I can run the following command from a command prompt successfully, but can't get it working with a VB script.
From CMD:
- Change directory to C:\Program Files (x86)\VMware\VMware Workstation\
- then run: vmrun.exe -T ws start "C:\Users\Office\Documents\Virtual Machines\Windows 7\Windows 7.vmx" nogui
What I've tried in VBS:
Dim objShell, strPath1, strAttr, strPath2
Set objShell = CreateObject ("WScript.Shell")
strPath1 = "C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe"
strAttr1 = " -T ws start "
strAttr2 = "C:\Users\Office\Documents\Virtual Machines\Windows 7\Windows 7.vmx"
strAttr3 = " nogui"
'WScript.Echo strPath1 & strAttr1 & """" & strAttr2 & """" & strAttr3
objShell.Run strPath1 & strAttr1 & """" & strAttr2 & """" & strAttr3
The error I get is: The system cannot find the file specified.