Run an .app after install

bobbyg
New Contributor II

I have created an app in automator that asks the user to contact IT. I built it as a pkg and uploaded it to jamf. I built a policy to install. All is great, but I need it to run it after it installs. Any thoughts on getting this done? Basically we are trying to let the user know to contact IT immediately and have this spoken repeatedly.

Robert Giordano
1 ACCEPTED SOLUTION

Matt_Roy93
Contributor

You can do this within Composer before you create the .pkg file, I will attach image below.
559984589b1e4e8788de94f3c399a54e

View solution in original post

10 REPLIES 10

AdamCraig
Contributor III

add a script that opens the application and have it run after the .pkg installs.

drtaru
New Contributor III

you need to have a postinstall script added to your pkg that launches the app.

Matt_Roy93
Contributor

You can do this within Composer before you create the .pkg file, I will attach image below.
559984589b1e4e8788de94f3c399a54e

Mauricio
Contributor III

Another way is use "Files and Processes" of a policy to call the app.
That saves you from re-downloading it and give you flexibility on re-using the app.

bbea573cbe5e4ac39511ff1d15f55e2a

bobbyg
New Contributor II

Thanks all! Got it.

Robert Giordano

jhuls
Contributor III

I'm guessing the board is having a hiccup of sorts. I just received 8 notifications that Matt_Roy93's post was marked as an answer.

hansjoerg_watzl
Contributor II

@Mauricio I just had this idea for a similar case. I need to run a command after a package is installed. I can't use postinstall within the package, as it is signed.
My question is, is the "execute command" always run after packages/script are processed?

drtaru
New Contributor III

@hansjoerg.watzl If you upload a script that you want to run and scope it in the same policy it will always run after the packages step.

0ddc8c1482664d6db2856e4e00742512

However if you modify the package or use composer to create a metapackage with a postinstall that installs the original package and then runs a command that works too. I use this frequently to bundle SAP and its prerequisites into a singular package for deployment

Mauricio
Contributor III

@hansjoerg.watzl 'Files and Processes' is the last thing to run in a policy.
You could also add scripts before or after packages (as mentioned by drtaru) to create the policy flow.
Here an example of an Adobe policy we use for the self-service.

b1cdbe88b5a540888a53fc983c7a363b

9700da07a3cd491db8b2c24d55116aa2

I hope this helps!

hansjoerg_watzl
Contributor II

Thanks, yes I tried it with "Files and Processes" and can confirm, that it was executed as last.
I knew I could also use a script (with After setting), but as it's only a short command, I don't want to create a script just for this simple command.
And now it works too ;-)