Skip to main content
Question

Script to detect Office 2016 activation method?

  • February 2, 2018
  • 4 replies
  • 16 views

Forum|alt.badge.img+18

We're planning to move away from a serialized volume license for Office 2016, which will require users to activate their existing copies of Office using O365. I've found that Outlook doesn't handle this very well and just goes into Offline mode instead of prompting the user to activate, which will be confusing and create help desk tickets. I'd like to build something to address that.

I can detect a serialized installation by looking for the license file we install, but I don't know how to detect if a copy of Office has been activated by the user. Does anyone have any insight into a method for checking that via script? Is there a file I can look for or an executable I can query?

4 replies

talkingmoose
Forum|alt.badge.img+36
  • Community Manager
  • February 2, 2018

I have a whole post about this on Jamf's blog: Steal this script!.


Forum|alt.badge.img+18
  • Author
  • Contributor
  • February 2, 2018

Thanks! I literally just found that a few minutes ago and am already tearing it apart for an extension attribute and other scripts.


Forum|alt.badge.img+14
  • Valued Contributor
  • February 2, 2018

office2016="/Library/Preferences/com.microsoft.office.licensingV2.plist"

office365=/Users/$userName/Library/Group Containers/UBF8T346G9.Office/com.microsoft.Office365.plist

These might help - along with what @talkingmoose posted.

EDIT
You'll need to populate the $userName variable. :)


Forum|alt.badge.img
  • New Contributor
  • February 5, 2018

This is what we use...

!/bin/sh

If com.microsoft.office.licensingV2plist exists

if [ -f "/Library/Preferences/com.microsoft.office.licensingV2.plist" ]; then result="Yes"

If com.microsoft.office.licensingV2plist does not exist

else result="No"
fi

Output result

echo "<result>$result</result>"

Exit script

exit 0