Skip to main content

I had this extension attribute that will tell me if the mac had Office 2016 or 2019 installed, I need one now for office 2021, can anyone help me modify it?

 

#!/bin/bash

wordVersion=$(defaults read "/Applications/Microsoft Word.app/Contents/Info.plist" CFBundleShortVersionString)
majorVersion=$(awk -F '.' '{print $1}' <<< "$wordVersion")
minorVersion=$(awk -F '.' '{print $2}' <<< "$wordVersion")

if [[ $majorVersion -ge "15" ]]; then
if [[ "$majorVersion" -ge "16" ]] && [[ "$minorVersion" -ge "17" ]]; then
echo "<result>2019</result>"
else
echo "<result>2016</result>"
fi
else
if [[ -d "/Applications/Microsoft Office 2011/" ]]; then
echo "<result>2011</result>"
else
echo "<result>Not Installed</result>"
fi
fi

exit 0

maybe im missing the question,


add a patch management for each of the Office apps..


then you get version tracked..


Thanks for the suggestion, I was able to create a smart group based on the patch management info.


Hi @ucdcastillo I use a script by @pbowden which you can find here https://github.com/pbowden-msft/ExtensionAttributes. It's called Office_License.sh


maybe im missing the question,


add a patch management for each of the Office apps..


then you get version tracked..


I'm actually trying to do this now. Do we have to provide the packages for each individual Office app, or is there some way to use the Jamf repository? If I can use the Jamf, how do I set that up? I'm slamming my head into a wall to do this.


Reply