【已解决】RunWait 运行DOS命令时如何使用变量
本帖最后由 wsmoxiannan 于 2012-11-10 10:28 编辑$Service_VM_Path = "E:\System\vmSystem\VM2003\Windows Server 2003 Enterprise Edition.vmx "
;将2003虚拟机镜像回滚
If @OSArch = "x64" Then
$vmrunPath = "C:\Program Files (x86)\VMware\VMware Workstation\vmrun "
Else
$vmrunPath = "C:\Program Files\VMware\VMware Workstation\vmrun "
Endif
RunWait( $vmrunPath & "revertToSnapshot " & $Service_VM_Path & "Auto-2003")RunWait( $vmrunPath & "revertToSnapshot " & $Service_VM_Path & "Auto-2003")这空格加的还不对么?
RunWait($vmrunPath & 'revertToSnapshot "E:\System\vmSystem\VM2003\Windows Server 2003 Enterprise Edition.vmx" "Auto-2003"')这就没问题 看_RunDos源码吧 感谢风行者指点,多次尝试后成功。
RunWait($vmrunPath & 'revertToSnapshot "' & $Service_VM_Path & '" "Auto-2003"')
页:
[1]