Creating an updated Office 2011 SP 2 installer
I’ve been working on getting Office 2011 SP 2 added to my work’s Casper Self Service, but I was hitting a problem. When I tried putting Microsoft’s unmodified Office 2011 SP 2 installer into Self Service and then installing it, the policy was failing. I didn’t want to repackage with Composer, as I’m generally a believer in using the standard installer whenever possible. Fortunately, after mulling it over for a bit, I realized that I had already solved this problem. As an added bonus, I should be able to include the latest Office updates and thus be able to deploy a fully up-to-date Office 2011 SP 2 installer. See below the jump for the details.
Volume-licensed Office 2011 SP 2 installer
Latest available Office 2011 updates
To build, set up a new Iceberg project. Since we’ll need to run this installer with root privileges, I recommend setting the project type to Darwin: Package. That will open the project with the installation privileges automatically set to root. In this case, I’m naming the project Microsoft Office 2011 SP2 14.2.2
Select your Office 2011 and applicable Office 2011 update installer packages. Drag them into the Additional Resources section of your Iceberg project.
Create the following choices.xml file and save it as noquit.xml. This should hopefully tell Office 2011 to not quit your browsers:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "> <plist version="1.0"> <array> <dict> <key>attributeSetting</key> <integer>0</integer> <key>choiceAttribute</key> <string>selected</string> <key>choiceIdentifier</key> <string>quit</string> </dict> </array> </plist>
Once created, drag the noquit.xml file into the Additional Resources section of your Iceberg project.
The last piece is telling the installers to run. For this, you’ll need a postflight script. Here’s the one I’m using:
#!/bin/sh sudo installer -dumplog -verbose -pkg "$1/Contents/Resources/Office 2011 with Service Pack 2 Installer.pkg" -target / -applyChoiceChangesXML "$1/Contents/Resources/noquit.xml" sudo installer -dumplog -verbose -pkg "$1/Contents/Resources/Office 2011 14.2.2 Update.pkg" -target / -applyChoiceChangesXML "$1/Contents/Resources/noquit.xml"
Once you’ve got the postflight script built, run the following command to make the script executable:
sudo chmod a+x /path/to/postflight
Once it’s been made executable, drag the script into the Installation Scripts section in the postflight line. Next, ensure the checkbox next to postflight is checked.
Last step, go ahead and build the package. (If you don’t know to build, check the Help menu for the Iceberg User Guide. The information you need is in Chapter 3 – Creating a package.)
Once the package has been built, test it by taking it to a test machine that doesn’t have Office 2011 installed and install it. The end result should be that you have a fully up-to-date Office 2011 SP 2 installed and ready to go.
At this point, I’ve successfully used this installer to install Office 2011 SP 2 12.2.2 via DeployStudio, in Casper’s Self Service, and by running it on its own. In all cases, it’s worked fine but test, test test.