Skip to Main Content
Patch My PC Feature and Application Request

A community where customers and the community can provide feedback to make a better product for everyone! For more details on how we prioritize request, please see:

Created by Per Weimann
Created on Apr 15, 2021

Update specific variables available in custom pre/post scripts

Not all vendors are doing a good job when I come to MSI and uninstalling previous versions. This can lead to multiple instances of the application showing up in Program and Features… This calls for a clean-up via post scripts.

Would it be possible to have variables like Vendor, Version, AppName ect. available to send to a post script as arguments, this way we can create more generic clean-up scripts.

Quick use case related to PSAppDeployToolkit (I'm not going to use PSADT as clean-up script, but it shows what I would like to do)

Remove-MSIApplications -Name ‘VLC media' -ExcludeFromUninstall (,('DisplayName',$AppName, 'Exact'))

  • Attach files
  • Adam Cook
    Aug 18, 2021

    In addition to this request, I think it would be nice to have the exit code of the install made available as a variable for arguments or environment variable in a post-script too.

  • +3

Installer exit code from within a custom post-script

It would be useful to know the exit code of the installer from within a post-script. Maybe the exit code could be stored in an environment variable from PatchMyPC-ScriptRunner.exe's session/scope, therefore child processes/scopes would inherit it....
Adam Cook about 3 years ago in Patch My PC Publisher 0 SHIPPED