Skip to main content
Solved

Run an .app after install

  • October 18, 2019
  • 10 replies
  • 43 views

Robert_Giordano
Forum|alt.badge.img+7

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.

Best answer by Matt_Roy93

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

10 replies

Forum|alt.badge.img+16
  • Valued Contributor
  • 182 replies
  • October 18, 2019

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


drtaru
Forum|alt.badge.img+12
  • Contributor
  • 28 replies
  • October 18, 2019

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


Forum|alt.badge.img+12
  • Valued Contributor
  • 65 replies
  • Answer
  • October 18, 2019

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


Mauricio11
Forum|alt.badge.img+11
  • Valued Contributor
  • 173 replies
  • October 21, 2019

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.


Robert_Giordano
Forum|alt.badge.img+7
  • Author
  • New Contributor
  • 7 replies
  • October 21, 2019

Thanks all! Got it.


Forum|alt.badge.img+14
  • Valued Contributor
  • 345 replies
  • October 22, 2019

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.


Forum|alt.badge.img+7
  • Valued Contributor
  • 76 replies
  • October 23, 2019

@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
Forum|alt.badge.img+12
  • Contributor
  • 28 replies
  • October 23, 2019

@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.

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


Mauricio11
Forum|alt.badge.img+11
  • Valued Contributor
  • 173 replies
  • October 24, 2019

@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.

I hope this helps!


Forum|alt.badge.img+7
  • Valued Contributor
  • 76 replies
  • October 24, 2019

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 ;-)