直接运行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
|