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:

30 VOTE
Status NOTED
Created by Adam Cook
Created on May 6, 2021

Make PatchMyPC-ScriptRunner.exe exit code same as pre/post script

If the application's installer exit code is a success, and the user has a pre or post script define, please consider allowing PatchMyPC-ScriptRunner.exe to exit with exit code of the pre or post script. It might be ideal for an admin to fail the install of an app or update if a pre or post script fails.

Perhaps this behaviour could be controlled via a checkbox in the Add custom pre/post script dialogue where the default behaviour is how it is today (not to use the pre/post script exit code, only the installer's) and enabling the checkbox would enable this new proposed functionality.

Perhaps the checkbox could be worded as "Use script exit code if installation is successful"

  • Attach files
  • Petru Barsan
    Reply
    |
    Dec 24, 2024

    We have a scenario where we need to reboot right after installing GlobalProtect via AutoPilot to get the vpn tunnel up. For this we have a postscript that checks if we are in AutoPilot exits with a 1641 exit code to signal for a hard reboot. This does not work as PatchMyPC-ScriptRunner.exe exits with the code of the msi installer.

  • Michael Escamilla
    Reply
    |
    Apr 5, 2024

    Would love to see this option.

    I am currently working an app that uses '2' as a 'Sucess but reboot Required' for an exitcode. My inital thought was use a Postscript to Capture the Code and turn it into a '0', but I didn't realize the Post scripts don't supersede the main install Codes.

    Adding this functionality could make handling custom exit codes much easier.

  • +15
9 VOTE

Allow for custom exit codes from Pre/post scripts to pass to Intune Management Extension

Merged
When using custom scripts allow the exit codes to be passed to intune management this will allow for additional error handling in a pre/post script
James Russell about 4 years ago in Patch My PC Publisher 1 NOTED