找回密码
 加入
搜索
查看: 1656|回复: 2

[AU3基础] 【已解决】RunWait 运行DOS命令时如何使用变量

[复制链接]
发表于 2012-11-9 20:43:36 | 显示全部楼层 |阅读模式
本帖最后由 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"')这就没问题
发表于 2012-11-10 04:02:42 | 显示全部楼层
看_RunDos源码吧
 楼主| 发表于 2012-11-10 10:26:50 | 显示全部楼层
感谢风行者指点,多次尝试后成功。
RunWait($vmrunPath & 'revertToSnapshot "' & $Service_VM_Path & '" "Auto-2003"')
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-29 19:24 , Processed in 0.079365 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表