App Installers, add script

Jako-Verstraate
New Contributor II

When I packaged Privileges 1.5.2 with Composer, I added a Postinstall-script that installs a privileges-helper.

I tried App Installers to update Privileges to 1.5.3; it installed fine, but then the helper was still in version 1.5.2 and therefor did not work.

Does anyone know a way to automatically install the latest helper after Privileges is updated via App Installers? you cannot add a postinstall-script to App Installers (yet?)

3 REPLIES 3

sdagley
Esteemed Contributor II

@Jako-Verstraate You could adapt your post install script to run as Jamf policy script payload, but the trick would be triggering it when the app is updated via an App Installer because there's no mechanism in that process to trigger a Jamf policy. You could use a Smart Group looking for the app to be newer than a specific version as the target scope.

AJPinto
Honored Contributor III

You will need to package Privileges Helper and scope it to a software group based on the version of Privileges installed. It wont be instant, but you can set it to run on recurring checkin so it should run the policy for Privileges helper the check in after Privileges updates.

 

  • Smart group to read Privileges version
    • Criteria Application Title is "whatever the application is called"
    • "and" Criteria Application Version is "whatever version you are needing"
  • Policy for Privileges helper that installs targeting the smart group made in the step above for the version you want. Policy trigger would be recurring check in run once per computer.

You can also make an Extension Attribute to read the Application version from the plist and a smart group around that if you prefer. 

Jako-Verstraate
New Contributor II

thanks for your answers, but it seems I need to do things manually to react to the fully automated update by App Installers. It would be nice if you could add a pre- or post-install script to the App-installer itself.

I think I'll file a feature request to App Installers "please add the possibility for adding pre- and post-install-scripts"