#NoTrayIcon
#RequireAdmin
Run(@ScriptDir & "\WinRARv3.93.exe")
$title="WinRAR 3.93 简体中文增强版"
$title2="WinRAR 简体中文版安装"
$title3="关联菜单项目"
WinWait($title,"目标文件夹(&D)")
WinActivate($title,"目标文件夹(&D)")
ControlClick($title, "目标文件夹(&D)", "Button2")
WinWait($title2,"WinRAR 关联文件")
WinActivate($title2,"WinRAR 关联文件")
ControlClick($title2, "WinRAR 关联文件", "Button25")
WinWait($title3,"选择显示在资源管理器右键菜单中的项目")
WinActivate($title3,"选择显示在资源管理器右键菜单中的项目")
ControlClick($title3, "选择显示在资源管理器右键菜单中的项目", "Button9")
ControlClick($title3, "选择显示在资源管理器右键菜单中的项目", "Button10")
ControlClick($title3, "选择显示在资源管理器右键菜单中的项目", "Button17")
WinWait($title2,"WinRAR 关联文件")
WinActivate($title2,"WinRAR 关联文件")
ControlClick($title2, "WinRAR 关联文件", "Button27")
WinWait($title2,"WinRAR 已经成功地安装到文件夹")
WinActivate($title2,"WinRAR 已经成功地安装到文件夹")
ControlClick($title2, "WinRAR 已经成功地安装到文件夹", "Button1")
Sleep(1000)
WinClose("C:\Documents and Settings\All Users\「开始」菜单\程序\WinRAR")
WinClose("WinRAR")
exit