Custom Trigger an Event with Jamf Apps Catalog/Mac Apps

josefrometa
New Contributor II

I want to trigger a script to run after the app is installed from Self Service. Currently the app is installed manually via Self Service. Its not a package, its from the Mac Apps/Jamf App Catalog. 

I want a custom event trigger that will run the script when the app is installed. 

What do I put here that will make that happen:

josefrometa_0-1739470278889.png

Any other settings I need to configure in this script policy to make it run proper?

Basically I want to run a simple script that will make Chrome Default but only after its been installed. I do not want to use a package (policy) to install Chrome, I want to keep installing it from Mac Apps/Jamf App Catalog which allows me to keep it up to date.

 

7 REPLIES 7

AJPinto
Esteemed Contributor

Jamfs Mac Apps use Apples MDM framework to install and update the app, there is no way to hook a script on to this. You can use Mac Apps to update Chrome on devices but the initial install will need to be a policy if you need to run a command with it.

cwaldrip
Valued Contributor

If timing isn't critical you could create a policy that runs once per computer with your desired script, and scope the policy to members of a smart group. Then have that smart group check for computers with the application name (and maybe version). When you first create the policy it'll run on existing machines with the app, but just once. After that as a new machine installs the App Store app in question then the computer will become part of that smart group (when inventory is next collected) and thus get the policy executed. A little awkward, but it should work.

josefrometa
New Contributor II

Yea I thought about doing it that way but I want something more instant vs having the computer to do an inventory check. We need something more like workflows in Jamf, if this then that....

As Mac Apps is via the MDM, Script will be executed via JAMF Policy (binary installed on the device), it's not possible to integrate it like a workflow, Creating a Smartgroup is the best way, if I am not wrong your device doesn't need to wait for Inventory update once the Application installed, Device sends the list of installed Application list as remote command so it should be quite fast

 

So when an application is installed from Self Service it pushes the list of apps to the Jamf? 

Only if you select the Inventory update option under the Maintenance category for the policy. Otherwise Jamf won't know if the app is actually installed until your regularly scheduled inventory update (I think the default setting is 24 hours).

But the app we are installing are from Jamf Apps Catalog/Mac Apps not a policy. If it was a policy I would just run the script right after within the same policy.

The script would be a policy. Just wonder if their is a way I can custom trigger that script policy to run when the app is install on the user's computer.