|
请大虾帮忙看一下。我下面有一个程序的自动卸载和安装两部分文件,单独运行均正常,但想将两部分合起来,先卸载后安装,就没找到方法。麻烦大家提点建议。
自动卸载程序:
Run(@ComSpec & " /c " & 'C:\Windows\EasyScan\uninstall.exe "/U:C:\Program Files\EasyScan\Uninstall\uninstall.xml"', "", @SW_HIDE)
WinWaitActive("EasyScan 卸载程序","下一步")
Send("!n")
WinWaitActive("确认")
ControlClick("确认","全部是","[CLASS:Button; INSTANCE:2]")
WinWaitActive("EasyScan 卸载程序","完成")
Send("!f")
FileDelete("C:\Windows\EasyScan Setup Log.txt")
FileDelete("C:\Windows\EasyScan Uninstall Log.txt")
DirRemove("C:\Program Files\EasyScan","1")
DirRemove("C:\Windows\EasyScan","1")
软件自动安装程序:Run("EasyScan_Setup_2006.02.10_1509.exe") WinWaitActive("EasyScan 安装程序")
Send("!n")
WinWaitActive("EasyScan 安装程序")
ControlClick("EasyScan 安装程序","我同意该许可协议的条款","Button3")
WinWaitActive("EasyScan 安装程序")
Send("{tab}{tab}")
WinWaitActive("EasyScan 安装程序")
Send("!n")
WinWaitActive("EasyScan 安装程序")
Send("{tab}{tab}")
Send("ES-LDY0-7706-SBIS-N3ED")
Send("{tab}{tab}")
WinWaitActive("EasyScan 安装程序")
Send("!n")
WinWaitActive("EasyScan 安装程序")
Send("!n")
WinWaitActive("EasyScan 安装程序")
Send("!n")
WinWaitActive("EasyScan 安装程序")
Send("!n")
WinWaitActive("EasyScan 安装程序")
Send("!n")
WinWaitActive("EasyScan 安装程序","完成")
Send("!f") |
|