Regarding your ChoiceChangesXML, I took it from your pkginfo and made a regular plist out of it (
http://pastebin.com/pyWYTSZk ). Then told installer to check it:
$ installer -pkg /Volumes/Microsoft\ Office\ 2011/Office\ Installer.mpkg/ -showChoicesAfterApplyingChangesXML ~/Desktop/testchoices.xml -target /
installer: choices file '/Users/user/Desktop/testchoices.xml' either could not be found or was malformed.
The dicts for the "choiceAttribute"s for "choiceIsEnabled" and "choiceIsVisible". They only matter in the GUI Installer.app and serve to confuse things in the CLI, so I removed those (
http://pastebin.com/F69cPibn ) and then asked installer to check it. It failed as above.
It appears you're attempting to disable three choiceIdentifiers, "appsupport", "communicator", and "messenger". Why "appsupport"? The fact that it's
not visible, but enabled and selected in my copy of the Office 2011 installer is a strong indicator that it shouldn't be disabled. I removed the appsupport key (
http://pastebin.com/c6TuG5An ) and tested again. It failed as above.
I then dumped the choices from the Office 2011 installer:
installer -showChoiceChangesXML -pkg /Volumes/Microsoft\ Office\ 2011/Office\ Installer.mpkg/ | grep -B5 messenger
And it responded in part:
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
Which has a choiceAttribute ("selected") that differs from your choiceAttribute ("choiceIsSelected"). Checking a cleaned up version of the showChoiceChangesXML output (set to disable messenger and communicator,
http://pastebin.com/CC860JX8 ) with the above "installer" command results in a positive response that installer understands the choice changes:
installer -pkg /Volumes/Microsoft\ Office\ 2011/Office\ Installer.mpkg/ -showChoicesAfterApplyingChangesXML ~/Desktop/testchoices.xml -target / | grep -B5 messenger
responds in part:
You can use the XML array in that last pastebin--in the future If choice changes need to be edited, start with the output of installer -showChoiceChangesXML (and remember to target a drive that doesn't have the software in question currently installed). See the Munki wiki for another example
https://github.com/munki/munki/wiki/ChoiceChangesXML .
A couple of other observations about that pkginfo:
- The "installs" array is an empty array. Either populate it or remove it, since it is ambiguous and implies "this installer item installs nothing", which means it might be considered to always be installed or never be installed. Don't leave it to chance.
- The "postinstall_script" is using "defaults write". postinstall_scripts run as root and won't write to the proper domain to disable the updater for regular users. Examine using Profiles to disable the updater.
- The uninstall_script is a bit heavy-handed (it attempts to operate against $HOME, which (like the postinstall_script) would be root's home since uninstall_scripts run as root) and misses things (it doesn't forget the pkg receipts). Possibly try uninstallation using Munki's built-in removepackages. If there's something more that needs to be done before or after removepackages runs, try using a preuninstall_script or a postuninstall_script
- Patrick