Creating a Microsoft Script Hosting (.vbs) script to uninstall Adobe Acrobat 5.0

I'm no programmer.  What I need to do is uninstall Adobe Acrobat 5.0 off of all the PC's on my network at once.  I would like to create a script to use with group policy to accomplish this task.  I did find a file on this site to uninstall a different program and it works great (http://www.experts-exchange.com/Operating_Systems/Win2000/Q_20875686.html?query=uninstalling+applications+vbs+scripting&clearTAFilter=true).  However, this file does not work with Adobe Acrobat 5.0.  Is there any way I can tweak the aforementioned script to work with Adobe Acrobat 5.0, or is there other alternatives?

Thanks,
Cheese
cheesebugahAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jacyCommented:
Yes that WMI script works, but only for Microsoft Installer applications (MSI). For Adobe Acrobat 5.0, you need to find out the uninstall string from the registry then execute it, see below:

=============================
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
 strComputer & "\root\default:StdRegProv")
 
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Adobe Acrobat 5.0"
strValueName = "UninstallString"

oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strUninstallFullPath

' the following line -y switch suppresses the confirmation question from poping up
strUninstallFullPath=strUninstallFullPath & " -y"

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run strUninstallFullPath,8,true
set WshShell=nothing
=============================

It is actually using InstallShield uninstaller, for more info on the parameters for the uninstaller, see http://support.installshield.com/kb/view.asp?articleid=q100021

The above script works nicely on my WinXP machine.

Jacy.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cheesebugahAuthor Commented:
That is very cool Jacy, I really appreciate the code.  Is there any way to prevent the user from being prompted for removal of shared files and what not?

Thanks again,
Cheese
0
cheesebugahAuthor Commented:
One more thing, can I substitute the path of any application after the line strKeyPath, to uninstall different programs, provided they're not MSI packages?  Some elaboration other than Yes or No, would be nice.

Thanks,
Cheese  
0
jacyCommented:
1. To prevent the confirmation of removing shared files, you can use the -a switch to enable silent mode. The switch basically functions "equivalent to an uninstallation in which the user selects the "No to all" option when this dialog box first appears" - according to InstallShield.

I.e. insert the line below after the -y switch

strUninstallFullPath=strUninstallFullPath & " -a"

2. As long as the installed application has a associated uninstaller program, the answer is yes you can substitue the application name as it exactly appears in the Windows Add/Remove programs dialog.
0
cheesebugahAuthor Commented:
Thanks so much Jacy.  Have a great day.

Cheese
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.