;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")