Issue with ChoiceChanges.xml Office installation

781 views
Skip to first unread message

Ali Yahya

unread,
Nov 28, 2014, 3:38:24 PM11/28/14
to munk...@googlegroups.com
Having some problems getting Office 2011 to install through Munki 2 with a custom ChoiceChanges.xml. It's strange because the installation works just fine if Munki isn't involved.

Here's the relevant portion of the pkginfo:

<key>installer_choices_xml</key>
       
<array>
               
<dict>
                       
<key>attributeSetting</key>
                       
<integer>0</integer>
                       
<key>choiceAttribute</key>
                       
<string>choiceIsEnabled</string>
                       
<key>choiceIdentifier</key>
                       
<string>appsupport</string>
               
</dict>
               
<dict>
                       
<key>attributeSetting</key>
                       
<integer>0</integer>
                       
<key>choiceAttribute</key>
                       
<string>choiceIsSelected</string>
                       
<key>choiceIdentifier</key>
                       
<string>appsupport</string>
               
</dict>
               
<dict>
                       
<key>attributeSetting</key>
                       
<integer>0</integer>
                       
<key>choiceAttribute</key>
                       
<string>choiceIsVisible</string>
                       
<key>choiceIdentifier</key>
                       
<string>appsupport</string>
               
</dict>
               
<dict>
                       
<key>attributeSetting</key>
                       
<integer>0</integer>
                       
<key>choiceAttribute</key>
                       
<string>choiceIsEnabled</string>
                       
<key>choiceIdentifier</key>
                       
<string>communicator</string>
               
</dict>
               
<dict>
                       
<key>attributeSetting</key>
                       
<integer>0</integer>
                       
<key>choiceAttribute</key>
                       
<string>choiceIsSelected</string>
                       
<key>choiceIdentifier</key>
                       
<string>communicator</string>
               
</dict>
               
<dict>
                       
<key>attributeSetting</key>
                       
<integer>0</integer>
                       
<key>choiceAttribute</key>
                       
<string>choiceIsVisible</string>
                       
<key>choiceIdentifier</key>
                       
<string>communicator</string>
               
</dict>
               
<dict>
                       
<key>attributeSetting</key>
                       
<integer>0</integer>
                       
<key>choiceAttribute</key>
                       
<string>choiceIsEnabled</string>
                       
<key>choiceIdentifier</key>
                       
<string>messenger</string>
               
</dict>
               
<dict>
                       
<key>attributeSetting</key>
                       
<integer>0</integer>
                       
<key>choiceAttribute</key>
                       
<string>choiceIsSelected</string>
                       
<key>choiceIdentifier</key>
                       
<string>messenger</string>
               
</dict>
               
<dict>
                       
<key>attributeSetting</key>
                       
<integer>0</integer>
                       
<key>choiceAttribute</key>
                       
<string>choiceIsVisible</string>
                       
<key>choiceIdentifier</key>
                       
<string>messenger</string>
               
</dict>
       
</array>

I've tried it removing the appsupport portion, which I think is the autoupdate app, but that didn't help. Also tried leaving in only the choiceIsEnabled or choiceIsSelected portions one at a time and that did not work, either.

Has anyone had any success in using ChoiceChanges with Office? I've removed it entirely from my pkginfo and have a postinstall script to remove Communicator and Messenger.

Any help would be appreciated!

Erik Gomez

unread,
Nov 28, 2014, 5:49:11 PM11/28/14
to munk...@googlegroups.com
Absolutely. CCXML is awesome. 

I've removed it entirely from my pkginfo and have a postinstall script to remove Communicator and Messenger.

Any help would be appreciated

Can you post your entire pkginfo as well as the client log?

--
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ali Yahya

unread,
Nov 30, 2014, 1:35:49 AM11/30/14
to munk...@googlegroups.com
Here's the full pkginfo: http://pastebin.com/Ur3qx0jc

The error message is along the lines of "ERROR: installer: choices file '/tmp/tmpxxxxxx/choices.xml' either could not be found or was malformed." 

foigus

unread,
Dec 1, 2014, 1:52:30 AM12/1/14
to munk...@googlegroups.com
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>
<key>choiceIdentifier</key>
<string>messenger</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:
<key>attributeSetting</key>
<integer>0</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>messenger</string>

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

Erik

unread,
Dec 1, 2014, 9:44:03 AM12/1/14
to munk...@googlegroups.com
Patrick beat me to it, but I'd also like to point out that the latest Office 2011 installer no longer comes with either of these packages.
Reply all
Reply to author
Forward
0 new messages