Re: Using WMI Scripting to Uninstall Acrobat Reader using Win32_Produc
- From: "asdf" <asdf@xxxxxxxx>
- Date: Wed, 22 Nov 2006 04:03:58 -0500
Not Program Files.
But subfolder e.g. darn stupid c:\Program Files\IamWithStupid\woah.exe
---------------
run regclean
http://search.microsoft.com/results.aspx?q=regclean&l=en&OtherSite=&mkt=en-US&FORM=QBMA
"asdf" <asdf@xxxxxxxx> wrote in message
news:u1A2sJhDHHA.1016@xxxxxxxxxxxxxxxxxxxxxxx
Remove/Rename that install folder e.g. Program Files."\root\cimv2")
run regclean.exe
----------------------
"bhall" <bhall@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7957DDF6-D624-42E3-93F6-FD5559286502@xxxxxxxxxxxxxxxx
Hello!Reader":
I'm trying to remove all versions of Adobe Acrobat Reader where the name
matches "Adobe Reader" except for "Adobe Reader for Pocket PC".
The following script works to uninstall everything matching "Adobe
---------------------------------
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
hasReader
Set colSoftware = objWMIService.ExecQuery _
("Select * from Win32_Product Where Name LIKE '%Adobe Reader%'")
For Each objSoftware in colSoftware
objSoftware.Uninstall()
Next
---------------------------------
However, I can't figure out how to exclude everything matching "Adobe
for Pocket PC". I tried doing something like:LIKE
---------------------------------
("Select * from Win32_Product Where Name LIKE '%Adobe Reader%' AND NOT
'%Adobe Reader for Pocket PC%'")difficult
---------------------------------
But that didn't work. When using WQL queries, it seems that it is
if not impossible to exclude a string from your query. If anyone else
helpful,any insights, please share. I found the following links somewhat
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/like_operator.aspalthough I'm still not sure how to tackle this:
http://www.microsoft.com/technet/scriptcenter/topics/win2003/like.mspx,
Thanks in advance!
.
- References:
- Prev by Date: Re: VBS will not run on some machines, NO errors
- Next by Date: Re: How to detect if Windows 98 is using Profiles?
- Previous by thread: Re: Using WMI Scripting to Uninstall Acrobat Reader using Win32_Produc
- Next by thread: Re: Using WMI Scripting/WQL Queries to remove various different progra
- Index(es):
Relevant Pages
|
|