Last active
March 6, 2018 03:34
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
@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
Hi Clayton,
In your postinstall script above, the "applyChoiceChangesXML" flag is preceded by a double hyphen "--", but it looks like it should be a single hyphen. I was getting errors and when I began troubleshooting my package using the command line installer, I got "installer: invalid option --applyChoiceChangesXML". When I changed it, my package worked great.
Thanks a million for your great resources!