System Center and App-V Fun...from an Automator's Point of View

Creating Uninstall Applications (NOT packages) - SCCM 2012

Creating Uninstall Applications (NOT packages) - SCCM 2012

  • Comments 1
  • Likes

BLUF: Who said creating an application to JUST run a one line script could not be easy?!

Old Software Cleanup

It is not uncommon to have a lot of old software (usually vulnerable to security risks) on your network.  Some applications don’t always uninstall older versions when installing newer versions, so cleaning up this software is important.

An uninstall script is usually a one liner.  Creating Applications in Configuration Manager 2012 for scripts is generally a lot more work than just creating a non-content package to run a one-line script.  Unfortunately you cannot use the supersedence feature of Configuration Manager Applications with packages.  To use the supersedence feature in Applications, you need at minimum two things: Uninstall String, and Detection Method.  With MSI installed applications, one piece of information is required to meet both of these requirements: Product ID or GUID.


  • Find current versions of software on the network

  • Create base MSI application (any will do)

  • Create Uninstall applications

Finding the software

How do you know if you have more than one version of software on the network?  I use queries (Monitoring->Queries) and usually return Display Name and Version with a query for Installed Applications.Display Name like %<softwareName>%.  To make this process a little easier, I would suggest returning Product ID as well.  This value will return a GUID for MSI installed applications.  As all of us SCCM administrators know, this value is very important when looking for a way to uninstall an application (msiexec.exe /x {GUID} /qn).

I like to have my data in Excel when working with it.  To do this, select one entry from the query results, select Ctrl-a to select all results, select Ctrl-c to copy the data, and select Ctrl-v to paste it into Excel.

Note: If the Product IDs returned are not GUIDs, more research will need to be done to collect the uninstall strings and detection methods for your software.  Uninstall string is usually found in the registry in HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\<ProductID> and HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\<ProductID> for x64 systems.  Examples of Detection Methods are file versions or registry settings.

Create Base MSI application

As the requirements indicate, the MSI needed for this step is not important.  Once one MSI application is created (feel free to copy an existing one), there are just a few updates that need to be made to it to make it your base Uninstall Application.

Once you have created the MSI application, open the Properties window of the Application.  Change the name to something like Uninstall Application Template on both the General Information and Application Catalog tabs.  Then open the Properties of the Deployment Type from the Deployment Type tab.  Change the Name of the existing DT to Uninstall <application>.  On the Content tab, delete the contents of the Content location.  On the Programs tab, change the Install program to dummy.msi as this is a required field, but we will not be using it.  Select OK twice to close the Properties windows and save the new application.

Application Creation

Create Uninstall Applications

This base MSI application can now be used to create the applications for uninstall.  All we really need to change in the copied application is the Name for meaning, the Uninstall program for the correct action, and the Detection Rule Clause so that the installed application can be found for action.  I am sure you can change names without instruction, so I will leave this to you.  This is where the spreadsheet comes in nicely; just copy the GUID and get ready to paste in two to three places.  Now all we have to do is create one uninstall application per old application.  The first place to paste the GUID is in the Uninstall program, the second may or may not be the Product code field on the Programs tab (seen it without and with), and the last in the Detection Rule Clause on the Detection Method tab.  Now we are ready to rid ourselves of this old software.

Setup Applications for Uninstall

On the Properties window of the Application, the last tab is Supersedence.  This tab allows you to select an existing application to be superseded and there is a checkbox for Uninstall.  Brilliant!Just enter each of the Uninstall applications, select the checkbox and be done.  You don’t even have to look for what computers need the old application removed.  If the newest application targets a machine that has any version of the application installed, it will install the newest version and uninstall all older versions, per the supersedence rules. I have not verified, but I think that if the newest application is already installed, and the superseded applications are added post, they will still uninstall given the requirements of the application for install.


The applications that customers have sought most to uninstall are Java and Adobe products as they seem to just hang around; I've even done VLC Player.  This model has proven well to clean up your network.

If you are looking for an even easier way to keep your network clean, AppV 5.0 SP2 has brought an easy way to manage these same type of applications.  My previous blog speaks about this:

As always....enjoy and keep on automating!!!

  • Really good article, thanks for the pointers, especially for Java and flash player

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment