Posted on 08-08-2024 07:52 AM
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
Solved! Go to Solution.
08-08-2024 08:18 AM - edited 08-08-2024 08:20 AM
maybe im missing the question,
add a patch management for each of the Office apps..
then you get version tracked..
08-08-2024 08:18 AM - edited 08-08-2024 08:20 AM
maybe im missing the question,
add a patch management for each of the Office apps..
then you get version tracked..
Posted on 09-16-2024 11:08 AM
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.
Posted on 08-12-2024 11:57 AM
Thanks for the suggestion, I was able to create a smart group based on the patch management info.
Posted on 08-13-2024 11:15 PM
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