Managing software applications is a major challenge for IT organizations. It’s been estimated that an organization can have 1800 or more applications and admins can spend 90% of their time managing those apps. That effort is expensive for a business but there’s another area of application management that could be costing as much or even more – over-deployed software.

“Over-deployed” is where software has been installed on client systems but isn’t needed or isn’t being used (for more information, take a look at 1E Software Waste Report). The smart thing to do would be to uninstall unused applications to reclaim licenses for use elsewhere or to reduce on-going maintenance costs. However, this isn’t always a simple task. 1E’s AppClarity provides industry leading tools to collect software inventory and reporting tools to identify where this waste is occurring.

Some applications provide good uninstall tools that can be automated by AppClarity. However, you will occasionally need to create custom uninstall commands which we’ll look at later in this article. Let’s start with the easier task of automating an uninstall.

  • Some Products may not support un-installation via the standard AppClarity registry search mechanism. In order to support such Products and extend the coverage of automation, AppClarity includes the ability to define custom command-lines for Products that have Software Reclaim policies set. For any Product with a custom command-line defined, AppClarity will attempt to use this method before falling back on the original Software Reclaimer behavior. The command-lines are configured in the Automation screen under the Custom Command Lines heading in the AppClarity console, as shown below:

automation appclarity custom command

On this screen you will see a list of Reclaimable Products. This means that Products will show all the Releases where that Product is installed. Those Products will either have a (mandatory or optional) Software Reclaim Policy already set or a policy is set to Prohibited. Any release shown in the list that has a command-line defined will have the name shown in bold.  The list will also show any Releases where command-lines have already been defined as these are not removed if the policy is changed.

The following picture shows where Adobe and Microsoft Products have Software Reclaimer policies set.  You can also see that Adobe Photoshop 4 and CS4 and Microsoft Office 2003, 2007 and 2010 all have custom command lines set as well:

software reclaimer policy microsoft appclarityCustom Command-Lines

To define a Custom Command-Line, you first select the Release you wish to set the command-line for. Enter the Uninstall Command Lines into the box for each release that is to be uninstalled.  Once the commands are correct, click the Apply button to set them for the selected Release.  Multiple command-lines may be defined for each Release these are entered in the text box using the <Enter> key. The lines do not text wrap— this allows the individual command-lines to be seen easily. The multiple command-lines are run in the order they appear from top to bottom.

appclarity 1e help tutorial

  • Custom command line error handling
    When a custom command line is executed, the AppClarity Software Reclaim Agent will check its return code.
  • Indicating success from a custom command line
    If the return code is 0, or is a particular code from the list shown below, the command will be assumed to have succeeded and the result will be returned to the AppClarity Service.
  • Successful return codes
    These codes are typically returned from standard Windows uninstall commands. The Windows definition and numeric value are shown in the list:

    ERROR_SUCCESS_REBOOT_INITIATED (1641)
    ERROR_SUCCESS_REBOOT_REQUIRED (3010)
    ERROR_SUCCESS_RESTART_REQUIRED (3011)
    Note:    This list may change in future releases

  • Indicating Failure from a custom command line
    If the return code is not 0, (either a positive or negative value), and is not in the above list, the command will be assumed to have failed and the AppClarity Software Reclaim Agent will continue uninstall processing as normal.

For custom scenarios, it is possible to terminate the reclaim process by returning the following code: -1610350080
This special return code informs the Reclaim Agent that the uninstall process is to stop immediately.  No further commands will be executed once the code is received.

Determining if a Custom Command-Line is needed
AppClarity by design will use the uninstall string located in the registry.  This makes the reclaimation process for the majority of programs fairly easy.  Just create a policy for the program you wish to uninstall and use the uninstall string that is located in the registry.

Example SCCM Query for Non-Msiexec.exe based Uninstall Strings for Adobe Acrobat

query appclarity 1e help

The query should return each product/application version with the count of machines having the uninstall string listed.  As you can see from the list below, they uninstall strings all have a common uninstall string, but the executable name is different along with the program locations.

ARPDisplayName00 Count UninstallString00
Adobe Acrobat 5.0 2 C:\WINDOWS\ISUNINST.EXE -f”C:\Archivos de programa\Archivos comunes\Adobe\Acrobat 5.0\NT\Uninst.isu” -c”C:\Archivos de programa\Archivos comunes\Adobe\Acrobat 5.0\NT\Uninst.dll”
Adobe Acrobat 4.0 1 C:\WINDOWS\ISUNINST.EXE -f”C:\Program Files (x86)\Common Files\Adobe\Acrobat 4.0\NT\Uninst.isu” -c”C:\Program Files (x86)\Common Files\Adobe\Acrobat 4.0\NT\Uninst.dll”
Adobe Acrobat 5.0 5 C:\WINDOWS\ISUNINST.EXE -f”C:\Program Files (x86)\Common Files\Adobe\Acrobat 5.0\NT\Uninst.isu” -c”C:\Program Files (x86)\Common Files\Adobe\Acrobat 5.0\NT\Uninst.dll”
Adobe Acrobat 4.0 120 C:\WINDOWS\ISUNINST.EXE -f”C:\Program Files\Common Files\Adobe\Acrobat 4.0\NT\Uninst.isu” -c”C:\Program Files\Common Files\Adobe\Acrobat 4.0\NT\Uninst.dll”
Adobe Acrobat 5.0 232 C:\WINDOWS\ISUNINST.EXE -f”C:\Program Files\Common Files\Adobe\Acrobat 5.0\NT\Uninst.isu” -c”C:\Program Files\Common Files\Adobe\Acrobat 5.0\NT\Uninst.dll”
Adobe Acrobat 4.0, 5.0 1 C:\WINDOWS\ISUNINST.EXE -f”C:\Program Files\Common Files\Adobe\Acrobat 5.0\NT\Uninst.isu” -c”C:\Program Files\Common Files\Adobe\Acrobat 5.0\NT\Uninst.dll”
Adobe Acrobat 5.0 1 C:\WINDOWS\ISUNINST.EXE -f”C:\Programme\Gemeinsame Dateien\Adobe\Acrobat 5.0\NT\Uninst.isu” -c”C:\Programme\Gemeinsame Dateien\Adobe\Acrobat 5.0\NT\Uninst.dll”
Adobe Acrobat 4.0 5 C:\WINNT\ISUNINST.EXE -f”C:\Program Files\Common Files\Adobe\Acrobat 4.0\NT\Uninst.isu” -c”C:\Program Files\Common Files\Adobe\Acrobat 4.0\NT\Uninst.dll”
Adobe Acrobat 5.0 8 C:\WINNT\ISUNINST.EXE -f”C:\Program Files\Common Files\Adobe\Acrobat 5.0\NT\Uninst.isu” -c”C:\Program Files\Common Files\Adobe\Acrobat 5.0\NT\Uninst.dll”

In this example you would have to research the silent uninstall command line similar to having to package an application silent install, but in this case it would be for removing a product without interrupting the user.

From looking at just the data from the query you would add the two custom command lines listed below for Adobe Acrobat 5.0.

C:\WINDOWS\ISUNINST.EXE -f”C:\Program Files\Common Files\Adobe\Acrobat 5.0\NT\Uninst.isu” -c”C:\Program Files\Common Files\Adobe\Acrobat 5.0\NT\Uninst.dll”

C:\WINDOWS\ISUNINST.EXE -f”C:\Program Files (x86)\Common Files\Adobe\Acrobat 5.0\NT\Uninst.isu” -c”C:\Program Files (x86)\Common Files\Adobe\Acrobat 5.0\NT\Uninst.dll”

Reviewing a few articles on the web, you may need to add the following as well:

C:\WINDOWS\ISUNINST.EXE -y -a -m -f”C:\Program Files\Common Files\Adobe\Acrobat 5.0\NT\Uninst.isu”

C:\WINDOWS\ISUNINST.EXE -y -a -m -f”C:\Program Files (x86)\Common Files\Adobe\Acrobat 5.0\NT\Uninst.isu”

Output of an Office 2003 Uninstall process from Start to Finish

Once an application is set for a mandatory reclaim, the following screenshot shows the steps taken during the uninstall process.

output of an Office 2003 uninstall process

AppClarity 1E best practices command code help




Want to write for 1E? We’ve made it easy to be a part of a quickly growing environment fostering the ideas and expertise of Microsoft MVPs. Not an MVP? You can still apply to write for us here. We can’t wait to hear what you’ve got to say!

1200x627

Follow us on social: Twitter, Facebook, LinkedIn

SHARE
Jerry Dismukes
Jerry Dismukes is a Senior Consultant at 1E. Jerry has been working with SMS since 2003 and been performing machine imaging since 1999. In addition to OS deployment, Jerry has expertise in Software Asset Management, specifically working with customers to leverage AppClarity to defend against vendor audits.