With the advent of Jamf Pro’s App Installers, this sort of thing is less relevant than it has been in the past, but for some, using a policy can be better due to the higher level of configuration & scope options. If your users are happy to install applications from Self Service, but you don’t want to update the .pkg every time there is an update, this is a great method. There are alternatives to this such as using Munki & Autopkg of course, but this is a more lightweight solution.
This process is as simple as using the following script to pull the latest version of the installer from Google/Microsoft’s public-facing link:
Chrome:
#!/bin/bash
#Step 1 - download Chrome pkg
curl --location --request GET 'https://dl.google.com/dl/chrome/mac/universal/stable/gcem/GoogleChrome.pkg' --output /Users/Shared/LatestChrome.pkg
echo "downloaded installer"
#Step 2 - install pkg
if [ -e /Users/Shared/LatestChrome.pkg ]
then
echo "Chrome installer downloaded, now beginning installation"
installer -pkg /Users/Shared/LatestChrome.pkg -target /
rm /Users/Shared/LatestChrome.pkg
else
echo "Chrome installer not downloaded, exiting"
exit 1
fi
exit 0
Microsoft Office:
#!/bin/bash
#Step 1 - download MS Office pkg
curl --location --request GET 'https://go.microsoft.com/fwlink/?linkid=525133' --output /Users/Shared/LatestMSOffice.pkg
echo "downloaded installer"
#Step 2 - install pkg
if [ -e /Users/Shared/LatestMSOffice.pkg ]
then
echo "MS Office installer downloaded, now beginning installation"
installer -pkg /Users/Shared/LatestMSOffice.pkg -target /
rm /Users/Shared/LatestMSOffice.pkg
else
echo "MS Office installer not downloaded, exiting"
exit 1
fi
exit 0