• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 551
  • Last Modified:

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
0
cheesebugah
Asked:
cheesebugah
  • 3
  • 2
2 Solutions
 
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
 
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now