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

Posted on 2004-11-30
Last Modified: 2013-11-14
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 (  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?

Question by:cheesebugah
    LVL 1

    Accepted Solution

    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

    The above script works nicely on my WinXP machine.


    Author Comment

    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,

    Author Comment

    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.

    LVL 1

    Assisted Solution

    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.

    Author Comment

    Thanks so much Jacy.  Have a great day.


    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    java update needs to be set up as msi 1 38
    commonTwo  challenge 63 69
    VBA color chart bars 12 50
    find a node in VST 2 36
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now