Skip to main content

Office for Mac Update Package

  • December 18, 2020
  • 1 reply
  • 110 views

jack.smith
Forum|alt.badge.img+1

Sometimes Microsoft Autoupdate is not recognize when office Office for Mac is not patched. This worklet is more of a work around than a solution, so take it for what its worth.

This does require someone to update the version and link each new Office for Mac release to match this site https://docs.microsoft.com/en-us/officeupdates/update-history-office-for-mac

The worklet will detect when Office for Mac is not at the desired version and then download the patch from Microsoft and install.

Evaluation Code

#!/bin/bash

ver="$(mdls '/Applications/Microsoft Excel.app' | grep Version | sed -e 's/[[:alpha:]([:space:],",:,=,^-]//g')"

if [[ $ver == "16.44" ]];then
  echo "Complaint $ver detected"
  exit 0
else
  echo "Non-Compliant $ver detected"
  exit 1
fi

Remediation Code

ver="$(mdls '/Applications/Microsoft Excel.app' | grep Version | sed -e 's/[[:alpha:]([:space:],",:,=,^-]//g')"
echo "$ver detected. Attempting to run installer."
curl -o /tmp/Microsoft_Excel.pkg 'https://officecdn.microsoft.com/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/Microsoft_Excel_16.44.20121301_Updater.pkg'
sudo installer -store -pkg "/tmp/Microsoft_Excel.pkg" -target /

1 reply

  • Former Automox Employee
  • 69 replies
  • December 18, 2020

That is excellent. Thanks for sharing!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings