Building an Office 2011 SP 4 14.4.1 and Lync 2011 14.0.8 Installer for Mac
In this guide we are going to be Building an Office 2011 SP4 14.4.1 and Lync 2011 14.0.8 Installer for Mac. I am going to use Packages to add the Upgrade to 14.4.1, Lync, Silverlight, Flip4Mac, Enterprise Vault and a patch file to our .PKG. I am going to cover how to build the script and how to include in it some safeguards to avoid some typical problems that have been identified with deploying this piece of software.
If you don’t use Enterprise Vault please ignore it, or use the code for it to load any other plugin or application you need side by side from Office.
Some portions of this article were originally written by Rich Trouton, over at Derfiounder.Wordpress.com who has kindly allowed us to use them and are used with his knowledge and consent.
For this project I will be using Stephan Sudre’s Integrated Packaging Environment, Packages, which is free, located at http://s.sudre.free.fr/Software/Packages/about.html
The Packages User Guide is available online at:
Removing Installer application quit function
We are going to begin by removing the Office 2011 Installer application quit function. This function forces you to shutdown browsers and applications before the installation runs. This aspect is more often than not a headache to Mac admins who want to remotely deploy the installer(s).
- Open Terminal and run this command to expand the contents of the Office installer or update installer package into a new directory. For this example, I will be expanding the contents into a folder called office_build:
This will create a folder called office_build with a number of installer packages inside. The problem script will be inside the package whose name includes all_quit.
Run the next command to edit the script (adjusting for the name of the all_quit installer package):
Replace all of the script’s current contents with the following content:
To convert the directory back into an installer-package, type the following in Terminal:
At this point, you will have an Office 2011 installer where the application quitting function will not run. This should make deploying the modified Office 2011 installer or update installer easier.
Note: The flattening will remove the digital certificate that the Office 2011 installers normally include. For most deployment tools, this should not be a problem but Gatekeeper may flag it if the installer is downloaded via a web browser.
Creating the Raw Package in Packages
1. Set up a new Packages project and select Raw Package.
2. In this case we are going to rename the project Microsoft Office 2011 SP4 14.4.1
3. Once the Packages project opens, click on the Project tab. You will want to make sure that the information you enter is correctly set here. In this example, I’m not changing any of the options from what is set by default.
4. Next, click on the Settings tab. In the case of this example, I want to install with root privileges and not require a logout, restart or shutdown. For this to happen, I am choosing the following options in the Settings section:
• In the Post-Installation Behavior section, set On Success: to Do Nothing
• In the Options section, check the box for Require admin password for installation.
• In the Identifier type: com.yourcompany.pkg.MicrosoftOffice2011SP41441 where yourcompany is your company name.
5. On the Scripts tab in your Packages project, select your installers and drag them into the Additional Resources section of your Packages project.
In the case of this example, I’m selecting the following installers:
Office 2011 14.3.0 with Service Pack 2 Installer.pkg
Office 2011 14.4.1 Update.pkg
6. The last part is telling the installers to run. For this you will need a post-install script. On the next page is the script I am using. If you have trouble reading it, you can also get it from: http://pastebin.com/CYDkpUwy
Notice that the $install_dir in the post-install script refers to the path to the packages working directory. That’s where Packages will be storing these installers, inside the Package-built installer’s embedded directory where it stores the items defined in the Additional Resources section.
The -target value is defined as “$3” because some information is passed along by the Packages-built installer to its included scripts when those scripts are run by the installation process. (For more information, see the PackageMaker How-To available here and search on the page for $3). In this case, -target being defined as “$3” nears that the post install script will install all the packages I listed above in the script into the desired drive.
The script also governs what order the installers run in, so in this case the main Office 2011 installer runs first and the update runs next after the first job finishes. The -dumplog and -verbose flags are to help tracking the progress of installation if you’re looking at the installer log.
7. Also there is a problem that’s been observed with previous Microsoft Office 2011 Installers and it usually involves the volume license file not being applied when it should be. This behavior may be seen with the 14.4.1 update in the following cases:
• Office 2011 is installed and then updated to 14.4.1 while nobody is logged in.
• Office 2011 is installed and then updated to 14.4.1 without any Office applications being launched between the initial installation and update.
These two scenarios will likely apply if you’re building a new machine using an automated deployment tool, but likely will not if you’re a home user.
With luck, this will only be an issue for 14.4.1 and Microsoft will fix this issue in the next 14.4.x update. In the meantime, the easiest fix I’ve found in my testing this week is to get the necessary volume license file from a machine that has Office 14.3.x installed on it and put it back on an as-needed basis.
The needed file is /Library/Preferences/com.microsoft.office.licensing.plist. If you have a volume-licensed version of Office 2011 installed on your Mac, you should have this file.
To address the issue of installing 14.4.1 without losing your volume license, we have injected this file in the code I am providing above. So with this installation you will be able to take your own com.microsoft.office.licensing.plist license file to build a unified Office 2011 SP 4 14.4.1 installer package that does not prompt for a product key. 🙂
8. Once you have got the post-install script built, run the command script below to make the script executable:
9. Once completed, add the post-install script to your Packages project.
10. Last step is to build the package. To do this you can either press Command-B or you can go to the menu above and click on Build.
Signing the installer
An additional advantage of re-packaging using Packages is that Packages by default creates flat packages, which can be signed with a Developer ID. This will allow your packages to be accepted by Gatekeeper.
Gatekeeper is a feature introduced in OS X Mountain Lion that helps protect users from downloading and installing malicious software. Signing the Packages-built flat package provides a way to accommodate Gatekeeper if you have installer packages which otherwise aren’t signed or can’t be signed.
To sign your installers, you will need to have an Apple Developer Connection membership. If you’re an ADC member, you can obtain an Developer ID Installer certificate from Apple using Xcode. Once you have your Developer ID Installer certificate installed, you can sign the Packages-built package with the following command:
In the case of this example, I will sign it with the following command:
To verify that your package has been signed, check your installer package to verify that it has a lock icon in the top-right corner. Next, click the lock icon to verify that the certificate is showing up as a valid Apple Developer ID Installer certificate.
I wanted to thank Rich Trouton again, for being kind enough to allow us to use portions of his article “Creating an Office 2011 SP 4 14.4.1 installer” written on April 9th 2014 over at his blog.