#NoTrayIcon
Run(@ScriptDir & "\WoptiFree.exe")
$hd="安装 - Windows优化大师"
WinWait($hd,"欢迎使用 Windows优化大师 安装向导")
WinWaitActive($hd,"欢迎使用 Windows优化大师 安装向导")
ControlClick($hd,"继续(&N) >","TNewButton1")
WinWait($hd,"许可协议")
WinWaitActive($hd,"许可协议")
ControlClick($hd,"我接受协议(&A)","TNewRadioButton1")
ControlClick($hd,"继续(&N) >","TNewButton2")
WinWait($hd,"选择组件")
WinWaitActive($hd,"选择组件")
ControlClick($hd,"继续(&N) >","TNewButton2")
WinWait($hd,"选择目标位置")
WinWaitActive($hd,"选择目标位置")
ControlSetText($hd,"","TEdit1","D:\Program Files\Wopti")
ControlClick($hd,"继续(&N) >","TNewButton3")
WinWait($hd,"选择开始菜单文件夹")
WinWaitActive($hd,"选择开始菜单文件夹")
ControlClick($hd,"继续(&N) >","TNewButton4")
WinWait($hd,"选择附加任务")
WinWaitActive($hd,"选择附加任务")
ControlClick($hd,"继续(&N) >","TNewButton4")
WinWait($hd,"准备安装")
WinWaitActive($hd,"准备安装")
ControlClick($hd,"安装(&I)","TNewButton4")
WinWait($hd,"完成 Windows优化大师 安装向导")
WinWaitActive($hd,"完成 Windows优化大师 安装向导")
ControlClick($hd,"运行 Windows优化大师","")
ControlClick($hd,"把网址之家设为首页","TCheckBox1")
ControlClick($hd,"完成(&F)","TNewButton4")