|
发表于 2009-6-5 13:12:27
|
显示全部楼层
感谢三楼~~~学习了~~
我太菜,小改了一下:
If FileExists(@ScriptDir & "\wrar380sc50000.exe") Then
Run(@ScriptDir&"\wrar380sc50000.exe")
WinWait("WinRAR 3.80 简体中文版","安装")
WinActivate("WinRAR 3.80 简体中文版","安装")
ControlClick("WinRAR 3.80 简体中文版","安装",1)
;send("{enter}")
WinWaitActive("WinRAR 简体中文版安装","WinRAR 关联文件")
ControlClick("WinRAR 简体中文版安装","WinRAR 关联文件","Button25")
WinWait("关联菜单项目","选择显示在资源管理器右键菜单中的项目")
WinActivate("关联菜单项目","选择显示在资源管理器右键菜单中的项目")
ControlCommand ("关联菜单项目","选择显示在资源管理器右键菜单中的项目", "Button2", "UnCheck", "" )
ControlCommand ("关联菜单项目","选择显示在资源管理器右键菜单中的项目", "Button3", "Check", "" )
ControlCommand ("关联菜单项目","选择显示在资源管理器右键菜单中的项目", "Button4", "Check", "" )
ControlCommand ("关联菜单项目","选择显示在资源管理器右键菜单中的项目", "Button5", "UnCheck", "" )
ControlCommand ("关联菜单项目","选择显示在资源管理器右键菜单中的项目", "Button6", "Check", "" )
ControlCommand ("关联菜单项目","选择显示在资源管理器右键菜单中的项目", "Button7", "Check", "" )
ControlCommand ("关联菜单项目","选择显示在资源管理器右键菜单中的项目", "Button8", "Check", "" )
ControlCommand ("关联菜单项目","选择显示在资源管理器右键菜单中的项目", "Button9", "UnCheck", "" )
ControlCommand ("关联菜单项目","选择显示在资源管理器右键菜单中的项目", "Button10", "UnCheck", "" )
ControlCommand ("关联菜单项目","选择显示在资源管理器右键菜单中的项目", "Button11", "UnCheck", "" )
ControlCommand ("关联菜单项目","选择显示在资源管理器右键菜单中的项目", "Button12", "UnCheck", "" )
ControlClick("关联菜单项目","选择显示在资源管理器右键菜单中的项目",1)
;send("{enter}")
WinWaitActive("WinRAR 简体中文版安装","WinRAR 关联文件")
ControlClick("WinRAR 简体中文版安装","WinRAR 关联文件",1)
WinWait("WinRAR 简体中文版安装","完成")
WinActivate("WinRAR 简体中文版安装","完成")
ControlClick("WinRAR 简体中文版安装","完成",1)
WinWait("WinRAR","")
WinActivate("WinRAR","")
winkill("WinRAR","")
MsgBox(4096, "安装成功", "WinRAR 3.80 简体中文版已成功安装,点击 确定 退出")
Exit
else
MsgBox(4096, "警告", "安装程序缺少主文件,无法安装,请向管理员索取~~~谢谢")
Exit
Endif |
|