Skip to content

Instantly share code, notes, and snippets.

@clburlison
Last active March 6, 2018 03:34
Show Gist options
  • Save clburlison/8fd09ae20de4279281f4 to your computer and use it in GitHub Desktop.
Save clburlison/8fd09ae20de4279281f4 to your computer and use it in GitHub Desktop.
Office 2016 Choice XML Example (this choice xml by default does not install Microsoft Autoupdate application) + Casper postinstall example. NOTE: Munki has a separate XML for copy/paste ability. https://clburlison.com/demystify-office2016
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.microsoft.word</string>
</dict>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.microsoft.excel</string>
</dict>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.microsoft.powerpoint</string>
</dict>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.microsoft.onenote.mac</string>
</dict>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.microsoft.outlook</string>
</dict>
<dict>
<key>attributeSetting</key>
<integer>0</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.microsoft.autoupdate</string>
</dict>
</array>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<---- Munkiimport/makepkginfo bits here ---->
<key>installer_choices_xml</key>
<array>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.microsoft.word</string>
</dict>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.microsoft.excel</string>
</dict>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.microsoft.powerpoint</string>
</dict>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.microsoft.onenote.mac</string>
</dict>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.microsoft.outlook</string>
</dict>
<dict>
<key>attributeSetting</key>
<integer>0</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.microsoft.autoupdate</string>
</dict>
</array>
<---- Munkiimport/makepkginfo bits here ---->
</plist>
#!/bin/bash
# Determine working directory
install_dir=`dirname $0`
# Install unlicensed Office 2016 with choice xml
/usr/sbin/installer -applyChoiceChangesXML $install_dir/office2016.xml -dumplog -verbose -pkg $install_dir/"Microsoft_Office_2016_Installer.pkg" -target "$3"
# Install Office 2016 Volume License Serializer
/usr/sbin/installer -dumplog -verbose -pkg $install_dir/"Microsoft_Office_2016_VL_Serializer.pkg" -target "$3"
exit 0
@clburlison
Copy link
Author

@milkerson, thanks I have updated the gist to only have a single hyphen. Comments on gists don't receive emails notifications normally so that's why this took so long for me to see your comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment