找回密码
 加入
搜索
查看: 2845|回复: 5

[AU3基础] 自动卸载driver

  [复制链接]
发表于 2013-3-13 20:31:38 | 显示全部楼层 |阅读模式
想在控制面板的卸载程式中卸载某个程式(如图中AMD install manager),
但是用auto info无法抓到这一项,  我现在是用"tab"键和"↓"键来选择的.
但这样会比较容易出错,  有没有能准确地抓到这一项的方法呢~??谢谢~~

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2013-3-14 11:58:10 | 显示全部楼层
不如查它的执行文件路径,直接执行
在注册这里查HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
 楼主| 发表于 2013-3-14 21:37:07 | 显示全部楼层
明天先去试试~~
发表于 2013-3-18 18:29:12 | 显示全部楼层
控制面板中的卸载程序在程序文件夹中有吧,直接运行uninstall就行了
 楼主| 发表于 2013-3-21 20:52:34 | 显示全部楼层
直接运行uninstall无法卸载 “install manager"
因为做的程式测试显卡,安装AMD的后不卸载这个”manager"的话,
再测试NV的卡就会报错.
我现在是这样写的, 刚刚接触这个,不足之处,大家见谅~

先判断是否安装过AMD的driver , 1.bat中写的是打开卸载程序界面(appwiz.cpl)
If FileExists("C:\Program Files (x86)\AMD APP") Then
Run('c:\pci\1.bat','')
Sleep(3000)
Send('{tab 9}')
Sleep(3000)
Send('{down}')
Sleep(1000)
Send('{enter}')
WinWait('AMD','The InstallShield')
WinActivate('AMD','The InstallShield')
ControlClick('AMD','&Next >','[CLASS:Button; INSTANCE:1]')
WinWait('AMD','Catalyst Install Manager')
WinActivate('AMD','Catalyst Install Manager')
ControlClick('AMD','Express Uninstall ALL AMD Software','[CLASS:Button; INSTANCE:4]')
Sleep(1000)
ControlClick('AMD','&Next >',"[CLASS:Button; INSTANCE:7]")
WinWait('AMD','This will remove')
WinActivate('AMD','This will remove')
ControlClick('AMD','OK','[CLASS:Button; INSTANCE:1]')
Sleep(17000)
WinWait('AMD','Remove the Program')
WinActivate('AMD','Remove the Program')
ControlClick('AMD','&Remove','[CLASS:Button; INSTANCE:1]')
Sleep(3000)
WinWait('AMD','The InstallShield Wizard')
WinActivate('AMD','The InstallShield Wizard')
ControlClick('AMD','&Finish','[CLASS:Button; INSTANCE:1]')
Sleep(3000)
If WinExists('Programs and Features','To uninstall a program') Then
        WinActivate('Programs and Features','To uninstall a program')
        WinClose('Programs and Features','To uninstall a program')
        EndIf
EndIf
Exit
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-17 14:40 , Processed in 0.076960 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表