zl5530535 发表于 2009-9-25 15:39:52

按顺序安装两个软件的问题

我的程序里想按顺序安装两个软件,为什么总是安装完第一个就不在执行了!高手帮忙!;Jre安装
Run("jre-6u4-windows-i586-p.exe", "",@SW_MINIMIZE)
WinWait('Java 安装 - 欢迎','查看许可协议...')
ControlClick("Java 安装 - 欢迎", "查看许可协议...", "Button2")
WinWait('Java 安装 - 完成 ','您已成功安装 Java(TM)')
ControlClick('Java 安装 - 完成 ','谢谢您的合作!',"Button1")
;Tomcat安装
Run("apache-tomcat-5.5.27.exe", "",@SW_MINIMIZE)
WinWait('Apache Tomcat Setup','Welcome to the Apache Tomcat Setup Wizard')
ControlClick("Apache Tomcat Setup", "Welcome to the Apache Tomcat Setup Wizard", "Button2")
WinWait('Apache Tomcat Setup ','Press Page Down to see the rest of the agreement.')
ControlClick('Apache Tomcat Setup ','Press Page Down to see the rest of the agreement.',"Button2")
WinWait('Apache Tomcat Setup','Or, select the optional components you wish to install')
ControlCommand('Apache Tomcat Setup','Or, select the optional components you wish to install',"ComboBox1","SetCurrentSelection",3)
ControlClick('Apache Tomcat Setup','Or, select the optional components you wish to install',"Button2")
WinWait('Apache Tomcat Setup','Setup will install Apache Tomcat in the following folder')
ControlSetText('Apache Tomcat Setup','Setup will install Apache Tomcat in the following folder',"Edit1",$stuppath)
ControlClick('Apache Tomcat Setup','Setup will install Apache Tomcat in the following folder',"Button2")
WinWait('Apache Tomcat Setup: Configuration Options','Tomcat basic configuration')
ControlSetText('Apache Tomcat Setup: Configuration Options','Tomcat basic configuration',"Edit3","admin")
ControlClick('Apache Tomcat Setup: Configuration Options','Tomcat basic configuration',"Button2")
WinWait('Apache Tomcat Setup: Java Virtual Machine path selection','Java Virtual Machine path selection')
ControlClick('Apache Tomcat Setup: Java Virtual Machine path selection','Java Virtual Machine path selection',"Button2")
WinWait('Apache Tomcat Setup','Apache Tomcat has been installed on your computer')
ControlClick('Apache Tomcat Setup','Apache Tomcat has been installed on your computer',"Button4")
ControlClick('Apache Tomcat Setup','Apache Tomcat has been installed on your computer',"Button5")

afan 发表于 2009-9-26 16:22:56

在 ;Tomcat安装 那里 sleep(500) 试试先
页: [1]
查看完整版本: 按顺序安装两个软件的问题