• Welcome to Support Forum: Get Support for Patch My PC Products and Services.
 

Custom post script and uninstall behavior when application updates

Started by BugsBunny, July 05, 2021, 02:43:52 PM

Previous topic - Next topic

BugsBunny

If I'm using a custom post script with an application, and if I change Patch My PC's default uninstall command in Configuration Manager, will I need to manually update that command every time Patch My PC updates the application?

Application in question is DBeaver. Everything appears to be working correctly in Configuration Manager--I've tested the install and uninstall and both are successful.

I did have to change the default Uninstall command in Configuration Manager (under "Deployment Type"). Originally it was set to "PatchMyPC-ScriptRunner.exe /UnInstallPackage", but this resulted in an error when I attempted to uninstall the application from within Software Center. I think this makes sense since I was using two different Detection Methods: one that confirmed the DBeaver executable was present, and one to confirm a custom registry key was present (which I was setting at the very end of my custom script), and the error code being thrown by the uninstall indicated one of the Detection Methods was still valid even though DBeaver was uninstalled.

So because I changed the default command, is this something I'll need to do manually each time the application gets updated by Patch My PC, or is there a way to get my Uninstall command (which is just the default command for the PowerShell App Deploy Toolkit: "Deploy-Application.exe -DeploymentType 'Uninstall') to "stick"?

Ben Reader (Patch My PC)

Hi,

If you modify the install / uninstall strings outside of the publisher (aka, in the CM console) then the next time the publisher finds an update it will be overwritten with the defaults.

Currently there is no way to customize the uninstall string in the manner you are looking for, as our packages are built with our own wrapper tools which do not share the same commandline arguments as the standard installers.

If this is something you would like to see in a future release of the product, please raise it as an idea @ ideas.patchmypc.com

Thanks,

Ben