Installing Cached Package Without Mounting DP

eddiel0w
New Contributor III

Hi - I've created a policy to cache a package. The package has cached successfully. Now I want to create a second policy to install that cached package but I DO NOT want to installALLCached packages and I DO NOT want to mount the distribution point because the package is already on the local machine.

Any other options?

3 REPLIES 3

mm2270
Legendary Contributor III

In your actual Install policy, under the Packages section, click and add the package again, but change the choice from the Action drop down menu to "Install Cached", instead of the default "Install".
Make sure to create a Smart Group that captures any Macs that actually have the package cached into the Waiting Room directory on them and use that as the scope though, or else the jamf binary will attempt to install a cached package that doesn't exist in many cases. This can be done by adding the "Cached packages" criteria item to the Smart Group (as well as any other criteria you need for the group) If you force the cache to occur on at least one Mac and make sure the inventory is collected, you can click the ellipses button (...) and choose the cached package name from a list when building the group.

damienbarrett
Valued Contributor

What if you just had a policy that runs a script to install the cached .pkg?

sudo /usr/sbin/installer -pkg /path/to/pkg.pkg -target /

So your path my be something like:

sudo /usr/sbin/installer -pkg /Library/Application Support/JAMF/Waiting Room/some.cached.pkg -target /

You might want to create a Smart group to look for anyone that has X package cached and then scope the policy to that group, or you'll get lots of policy execution errors as the script attempts to run on machines that don't have the package cached.

eddiel0w
New Contributor III

Revisiting this post to help someone else with this issue. I did discover that if you have scripts written in the JSS and you add them to your policy the shares will mount.