$title="飞信2011 安装"
FileInstall ( "Fetionbeta_4.5.900.0.exe", @TempDir & "\Fetionbeta_4.5.900.0.exe" ) ;这里加了fileinstall,编译后文件就打包在一起了,这样可以防止改名后无法找到安装程序
Run("%temp%/Fetionbeta_4.5.900.0.exe")
WinWait($title,"这个向导将指引您完成“飞信2011 Beta·夏花”的安装进程")
WinActivate($title,"自定义安装")
ControlClick($title,"自定义安装","Button5")
WinWait($title,"选择安装位置")
WinActivate($title,"选择“飞信2011”的安装文件夹。")
ControlSetText ( $title,"C:\Program Files\China Mobile\Fetion", "Edit1", "D:\Program Files\China Mobile\Fetion")
Sleep("100")
ControlClick($title,"添加桌面快捷方式","Button6")
Sleep("100")
ControlClick($title,"添加快速启动栏快捷方式","Button7")
Sleep("100")
ControlClick($title,"下一步","Button2")
Sleep("100")
WinWait($title,"选择个人文件夹(用于保存消息记录等数据)的保存位置")
WinActivate($title,"自定义")
ControlClick($title,"自定义","Button5")
Sleep("100")
ControlSetText($title,"d:\我的文档\Fetion","Edit2","F:\聊天资料保存")
Sleep("100")
ControlClick($title,"安装","Button2")
FileDelete (@TempDir & "\Fetionbeta_4.5.900.0.exe" ) ;安装完了清理文件,释放空间
|