Tired of spending time looking for patch detection rules for MSP installer files? look no further, this little tool automatically generates you a valid registry detection key by simply importing the MSP file into the tool.

** Requirements 

Requires PowerShell V3 or above.

MSI Powershell module by Heath Stewart. (https://www.powershellgallery.com/packages/MSI/3.2.31-g4a6be0535a)

Make sure you are running at least version 3.2.26.21626 of the MSI module as older versions are missing cmdlets used by this tool.

Credit to Adam Bertram for his convert to and from compressed GUI, (https://www.adamtheautomator.com/compressed-guid-with-powershell/)

First install the great Powershell MSI module.

Once the module is installed run the script PS1 file or the EXE if you prefer.

The console at the bottom should state the MSI module was detected. Browse to the patch \ MSP file via the browse button.

Navigate to file:

Once the file is loaded the tool will give you an install, uninstall and registry key path that can be used for a detection rule for the application deployment model in Configuration Manager.

The line Patch Table Information shows if the patch allows removal. If it doesn't then it also omitts the uninstall command line from the output as soon below:

Some patch files are applicable to more than one product. In this instance as above a dropbox is displayed where you can choose the correct product code, or you can browse to the base MSI file that the patch is designed for.

 

Example of detection rule: