jitendra Posted September 22, 2009 Posted September 22, 2009 I need a script to open Add/Remove programs and then select the application and clicking uninstall. Please help me
somdcomputerguy Posted September 22, 2009 Posted September 22, 2009 Here's a link to a script with just about everything you need AutoIt. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
PsaltyDS Posted September 22, 2009 Posted September 22, 2009 I need a script to open Add/Remove programs and then select the application and clicking uninstall.Please help meIf it's listed in Add/Remove Programs, then it has an entry in the registry. For example, Flash 10 is at:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0DFB3DE8-65B9-44FF-AA0A-3BECC5A2BFD1}Under that location is the executable string for uninstall in the "UninstallString".Find\Get that string and execute it with Run() or RunWait() Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Juvigy Posted September 23, 2009 Posted September 23, 2009 Check this out : Func WMIService($host) ;Connects to WMI Service $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $host & "\root\cimv2") If not IsObj($objWMIService) Then return 0 return $objWMIService EndFunc Func WMIQuery($objWMIService,$strWMIQuery) ;Perform WMI Query with Query String and Data Return Parameters $colItems = $objWMIService.ExecQuery($strWMIQuery) For $objItem in $colItems ;MsgBox(0,"asdasd",$objitem.name) $objItem.Uninstall() Next return 1 EndFunc $objWMIService = WMIService("localhost") ;WMIService Object - Establish Connection If $objWMIService = 0 Then Exit ;~ $objWMIService1 = WMIService("localhost") ;WMIService Object - Establish Connection ;~ If $objWMIService1 = 0 Then Exit $soft1 = WMIQuery($objWMIService,"Select * from Win32_Product Where Name like '%Photoshop%'") If $objWMIService = 0 Then MsgBox(0,"Error","An error have accured") Exit EndIf $objWMIService = 0 MsgBox(0,"Success","Uninstall compleeted successfully") This line: $soft1 = WMIQuery($objWMIService,"Select * from Win32_Product Where Name like '%Photoshop%'") is where you specify what to uninstall. The example uninstall everything that has "Photoshop" in the title.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now