Uninstall any version.

Comments

6 comments

  • Matt Ayres

    This is for an MSIExec package btw

    0
    Comment actions Permalink
  • Christian Bacher

    That's easy because a MSI package provides a uninstall string:

    CMD Step:

    wmic product where "name like 'Adobe Flash Player%%'" call uninstall

    Replace 'Adobe Flash Player%%' with 'your_application%%'

    Example:

    wmic product where "name like 'Microsoft Visual C++%%'" call uninstall

    removes all C++ Versions like:

    Microsoft Visual C++ 2005 Redistributable

    Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729

    Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219

    Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.40660

    Microsoft Visual C++ 2015 Redistributable (x86) - 14.0.24215

    0
    Comment actions Permalink
  • Colby Bouma

    It's generally not a good idea to use WMIC to uninstall programs like that. I'm having trouble finding the link I'm thinking of, but if I recall correctly WMIC reconfigures all applications when you do this. I recommend looking at our Uninstall packages in the Package Library. We enumerate the Registry to look for the GUID and pass that to MsiExec.

    0
    Comment actions Permalink
  • Christian Bacher

    "We enumerate the Registry to look for the GUID and pass that to MsiExec."

    Hi Colby,

    that's excatly what WMIC does, looking for the uninstall string with the GUID from the registry and run him. Try it and look in the log file.

    In therory you could use wmic to uninstall non msi packages too, but the missing individual /silent parameters are breaking a uninstall.

    0
    Comment actions Permalink
  • Colby Bouma

    I talked to a coworker to clarify what I was trying to remember. It does reconfigure all applications (event ID 1035 in the Application log), but it's probably fine. There's a possibility of it messing with some timestamps and some poorly written applications may misbehave after being reconfigured. We call MsiExec with a GUID because it has fewer side effects.

    0
    Comment actions Permalink
  • Brad McClave

    Scripts help. I use this one for Java (sorry it's not up to date ATM). When a new version comes out, I just add the previous version to the top of the list.

        :: Sun / Oracle Java Runtime Environment (JRE) Uninstallation Script
    
     REM JavaFX 2.1.1
     start /wait MsiExec.exe /uninstall {1111706F-666A-4037-7777-211328764D10} /qn /norestart
     REM JavaFX 2.1.0
     start /wait MsiExec.exe /uninstall {1111706F-666A-4037-7777-210328764D10} /qn /norestart 
     REM JRE Runtime Environment 8 Update 171
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F32180171F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F64180171F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 162
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F32180162F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F64180162F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 161
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F32180161F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F64180161F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 152
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F32180152F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F64180152F0} /qn /norestart 
     REM JRE Runtime Environment 8 Update 151
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F32180151F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F64180151F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 144
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F32180144F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F64180144F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 141
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F32180141F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F64180141F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 131
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F32180131F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F64180131F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 121
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F32180121F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F64180121F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 112
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F32180112F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F64180112F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 111
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F32180111F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F64180111F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 102
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F32180102F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F64180102F0} /qn /norestart 
     REM JRE Runtime Environment 8 Update 101
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F32180101F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F64180101F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 92
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218092F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418092F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 91
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218091F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418091F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 77
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218077F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418077F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 74
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218074F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418074F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 73
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218073F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418073F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 72
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218072F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418072F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 71
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218071F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418071F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 66
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218066F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418066F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 65
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218065F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418065F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 60
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218060F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418060F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 51
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218051F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418051F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 45
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218045F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418045F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 40
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218040F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418040F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 31
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218031F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418031F0} /qn /norestart
     REM JRE Runtime Environment 8 Update 25
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86418025F0} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83218025F0} /qn /norestart
     REM JRE Runtime Environment 7 Update 67
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F06417067FF} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F03217067FF} /qn /norestart
     REM JRE Runtime Environment 7 Update 65
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F06417065FF} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F03217065FF} /qn /norestart
     REM JRE Runtime Environment 7 Update 60
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F06417060FF} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F03217060FF} /qn /norestart
     REM JRE Runtime Environment 7 Update 55
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417055FF} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217055FF} /qn /norestart
     REM JRE Runtime Environment 7 Update 51
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417051FF} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217051FF} /qn /norestart
     REM JRE Runtime Environment 7 Update 45
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417045FF} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217045FF} /qn /norestart
     REM JRE Runtime Environment 7 Update 40
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217040FF} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417040FF} /qn /norestart
     REM JRE Runtime Environment 7 Update 25
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417025FF} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217025FF} /qn /norestart
     REM JRE Runtime Environment 7 Update 21
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417021FF} /qn /norestart
     start /wait MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217021FF} /qn /norestart
    
    0
    Comment actions Permalink

Please sign in to leave a comment.