Using Software Management Solution to Uninstall Applications Using a Script
search cancel

Using Software Management Solution to Uninstall Applications Using a Script

book

Article ID: 428258

calendar_today

Updated On:

Products

Software Management Solution

Issue/Introduction

There may be times when you find yourself needing to uninstall a piece of software using a script of some sort.  For example, PowerShell.  What settings should be used to properly run the script?

Environment

Software Management Solution 8.x

Cause

Command line type is not set correctly.

Resolution

After creating the software release that will contain the script file used to uninstall the software, your next step may be to create a detection rule.  The goal of this detection rule would be to detect if the software is installed.

You may think that when creating the software release for the script, you would choose Uninstall as the command type.

Since you are using a custom script to uninstall the software, you would need to choose the command type of Install, rather than Uninstall.  That way, the compliance check (Detection Check) will check to see if the software is installed, and if not, it will execute your custom script file.