add a script to an app install

Sobchak
Contributor

We want to make OneDrive available in Self Service, but we need a script to run after install. It looks like you are supposed to make the app available in "Mac App Store Apps", but there is no place to add a script in there.

My next thought was to create a policy to run the script, but there does not seem to be a trigger that would be helpful unless "custom event" would work?

9 REPLIES 9

JustDeWon
Contributor III

Why not just create a smart group for the OneDrive app installed, then create a policy with that script, and scope it to that smart group?

Sobchak
Contributor

I need the script to run as soon as the install finishes, and before they use it for the first time.

mm2270
Legendary Contributor III

It doesn't look possible to have anything run, like a script, after a Mac App Store install from the JSS using the MAS built in mechanism. You can only do that with full policies. Seems to me like a Feature Request is in order here - to make Mac App Store installs as full featured as policies, or at least being able to run a script or additional manual package after the installation. I don't know if such a thing would be possible to include, but it can't hurt to ask.

Josh_Smith
Contributor III

Can you call a Mac App Store install policy via a custom trigger? (I don't have a way to check at the moment)

If not, disregard.

If so, you could have a regular SS Policy that calls the trigger, then runs your script.

mm2270
Legendary Contributor III

I'm still not on an up to date version of the JSS, so I don't know if anything has changed recently, but on our 9.82 JSS, there is no way to add a custom trigger to a Mac App Store install. You can set it up, scope it, set the Category and select a distribution method (Install automatically / Prompt user or Make available in Self Service) That's it. So, again, unless something has changed in the last couple of revs, doesn't look like you can call it from a custom trigger like a regular policy.

jared_f
Valued Contributor

If you install it on your Mac and drag it from "Applications" into Composer and you could add a post install script there and redistribute it via a policy. Licensing should not be an issue seeing that it is a free app. I mentioned this re-packaging process here:

https://www.jamf.com/jamf-nation/discussions/21799/script-execution-after-pkg-install

Hope this helps!
Jared

talkingmoose
Moderator
Moderator

A standalone version of OneDrive (an Apple Installer package) should be available this week according to Jonathan Leung. He's one of the Microsoft developers responsible for OneDrive and interacting with us in the MacAdmins Slack team.

If you can hold a few days, you can get this installer and add it to a policy with an "After" script to handle this.

Sobchak
Contributor

The standalone version would solve everything. When you see it released it would be awesome if you could post that here.

talkingmoose
Moderator
Moderator

Released a few moments ago... OneDrive standalone installer for Mac.

https://support.office.com/en-us/article/New-OneDrive-sync-client-release-notes-845dcf18-f921-435e-b...