Further slipstreaming of MS Office

By following the instruction from this post: Deploying MS Office 2011, we will have the MS Office installer pkg, and an prep-package that we created from the last post. Now there are two improvements we want to make.

  • The prep-package adds plists/files to the User Template, the next step would be to add the same files for existing users.
  • Merge the installer pkg and the prep package.

1. Adding ~/Library files for existing users

The prep package is in a .mpkg format and is comprised of a group of .pkg’s and a distribution file. In the PackageMaker project for the package, choose the last component and add a postflight script to it (we’ll look at the contents of this script later). Build the project and then open it in finder. You’ll find that each of the components is its own package. Find the package that contains the postflight file, in the Contents/Resources/ directory add all the ~/Library/ files you need to copy.
1. ~/Library/Preferences/com.microsoft.autoupdate2.plist
2. ~/Library/Preferences/com.microsoft.error_reporting.plist
3. ~/Library/Preferences/com.microsoft.Excel.plist
4. ~/Library/Preferences/com.microsoft.language_registration.plist
5. ~/Library/Preferences/com.microsoft.office.plist
6. ~/Library/Preferences/com.microsoft.outlook.database_daemon.plist
7. ~/Library/Preferences/com.microsoft.PowerPoint.plist
8. ~/Library/Preferences/com.microsoft.Word.plist
9. ~/Library/Preferences/Microsoft/
10. ~/Library/Application Support/Microsoft
Put ~/Library/Preferences/Microsoft in a folder named Library in the Contents/Resources/. Now for the postflight script. The basic jist is that the script has to copy the files from the Resources directory to the /Users/$user/Library/ for each user. The script looks like something like below, edit as needed: #!/bin/sh

# office-setup.sh
# Moves ~/Library/ files from pkg to user’s directory
# Created by LITO on 3/14/11.
# Copyright 2011 Columbia. All rights reserved.

for folder in /Users/*
/bin/cp $1/Contents/Resources/com.microsoft.autoupdate2.plist $folder/Library/Preferences/
/bin/cp $1/Contents/Resources/com.microsoft.error_reporting.plist $folder/Library/Preferences/
/bin/cp $1/Contents/Resources/com.microsoft.Excel.plist $folder/Library/Preferences/
/bin/cp $1/Contents/Resources/com.microsoft.language_register.plist $folder/Library/Preferences/
/bin/cp $1/Contents/Resources/com.microsoft.office.plist $folder/Library/Preferences/
/bin/cp $1/Contents/Resources/com.microsoft.outlook.database_daemon.plist $folder/Library/Preferences/
/bin/cp $1/Contents/Resources/com.microsoft.outlook.office_reminders.plist $folder/Library/Preferences/
/bin/cp $1/Contents/Resources/com.microsoft.Powerpoint.plist $folder/Library/Preferences/
/bin/cp $1/Contents/Resources/com.microsoft.Word.plist $folder/Library/Preferences/
if [ -d $folder/Library/Preferences/Microsoft ]
if [ -d “$folder/Library/Preferences/Microsoft/Office 2011” ]
/bin/cp $1/Contents/Resources/Library/Microsoft/Office*2011/* $folder/Library/Preferences/Microsoft/Office*2011/
/bin/chmod -R 775 $folder/Library/Preferences/
/bin/chown -R $USER $folder/Library/Preferences/

/bin/mkdir $folder/Library/Preferences/Microsoft
/bin/mkdir “$folder/Library/Preferences/Microsoft/Office 2011”
/bin/cp $1/Contents/Resources/Library/Microsoft/Office*2011/* $folder/Library/Preferences/Microsoft/Office*2011/
/bin/chmod -R 775 $folder/Library/Preferences/
/bin/chown -R $USER $folder/Library/Preferences/
if [ -d “$folder/Library/Application Support/Microsoft” ]
if [ -d “$folder/Library/Application Support/Microsoft/Office” ]
if [ -d “$folder/Library/Application Support/Microsoft/Office/User Templates” ]
/bin/cp $1/Contents/Resources/Microsoft/Office/User*Templates/* $folder/Library/Application*Support/Microsoft/Office/User*Templates/
/bin/chmod -R 775 $folder/Library/Application*Support/*
/bin/chown -R $USER $folder/Library/Application*Support/*
/bin/mkdir “$folder/Library/Application Support/Microsoft”
/bin/mkdir “$folder/Library/Application Support/Microsoft/Office”
/bin/mkdir “$folder/Library/Application Support/Microsoft/Office/User Templates”
/bin/cp $1/Contents/Resources/Microsoft/Office/User*Templates/* $folder/Library/Applications Support/Microsoft/Office/User*Templates/
/bin/chmod -R 775 $folder/Library/Application*Support/*
/bin/chown -R $USER $folder/Library/Application*Support/*


exit 0

note: It’s important to chmod 775 the folders otherwise the user will not have read rights and this will all be for naught.

2. Merging installer and prep packages

I used OfficeForMac’s help page on distribution.dist to execute my deployment. The first step was to open up the Office 2011 package and the prep package. move the packages from the prep package to the Office pkg (the directory in the package is /Contents/Packages). I would make a directory in Contents/Packages called user_lib and stash the prep packages there. Once the packages are in place, you want to edit Contents/distribution.dist
There are three types of edits, and it’s best to start from the bottom up. At the bottom you’ll find package references that tell you where to find the package, the size of the package, an user defined id (which is used in the next step), version and other actions. An example would be: <pkg-ref id="com.microsoft.office.en.commsms-1.pkg.14.0.0" version="14.0.2" installKBytes="123904" auth="Admin" onConclusion="None">file:./Contents/Packages/user_files/microsoft-1.pkg</pkg-ref>
Set the file’s path to the location of your package. Then set the installKBytes if you want, it’s not necessary. Set the pkg-ref id to something descriptive and brief, as it’ll be used in the next step. A package reference needs to be created for every package.
Next we have to add a choice to install our prep packages. Above the pkg-ref’s are the choices, add a choice like the one below:<choice id="user-lib" title="userlib-title" description="userlib-description" tooltip="userlib-tooltip" start_selected="true" start_enabled="true" start_visible="true">
<pkg-ref id="com.microsoft.office.en.commsau2.pkg.14.0.0"></pkg-ref>
<pkg-ref id="com.microsoft.office.en.commsrpt.pkg.14.0.0"></pkg-ref>
<pkg-ref id="com.microsoft.office.en.commsexcel.pkg.14.0.0"></pkg-ref>
<pkg-ref id="com.microsoft.office.en.commslang.pkg.14.0.0"></pkg-ref>
<pkg-ref id="com.microsoft.office.en.commsoff.pkg.14.0.0"></pkg-ref>
<pkg-ref id="com.microsoft.office.en.commsoutdb.pkg.14.0.0"></pkg-ref>
<pkg-ref id="com.microsoft.office.en.commsoutrem.pkg.14.0.0"></pkg-ref>
<pkg-ref id="com.microsoft.office.en.commspp.pkg.14.0.0"></pkg-ref>
<pkg-ref id="com.microsoft.office.en.commsword.pkg.14.0.0"></pkg-ref>
<pkg-ref id="com.microsoft.office.en.commsms.pkg.14.0.0"></pkg-ref>
<pkg-ref id="com.microsoft.office.en.commsms-1.pkg.14.0.0"></pkg-ref>

In this format, the first thing to do is set the choice id, title and description. It’s also advisable to set the start_visible to false. The choice id will be referenced above, so it should be something short but descriptive. Within the <choice> and </choice> we add the packages that will be installed for the choice, identified by their pkg-ref ids.
After that is done, we want to add a line choice for our new choice, this is done in the choices-outline section by adding a line like: <line choice="user-lib"></line>
Now our install package will install office and also install the ~/Library files for all users and the user’s template. This package is easy to push out through ARD or synctool via the installer command making it totally silent.

Deploying MS Office 2011

In terms of deployment, there has been little change between MS Office 2008 and MS Office 2011. Firstly, I use DeployStudio to deploy the initial install of Office, otherwise OS X’s builtin installer command also does the trick. However, after Office has been installed, you don’t want users to get all the pesky notifications about activating their copy or downloading updates and such. If you use OS X Server, you can follow the advice from Managing OSX. Otherwise, you can use the same idea and build a package that deploys all the same plists. This method requires access to one machine with Office 2011 installed and setup as you’d like. In PackageMaker, add the following files to your package:

  1. ~/Library/Preferences/com.microsoft.autoupdate2.plist
  2. ~/Library/Preferences/com.microsoft.error_reporting.plist
  3. ~/Library/Preferences/com.microsoft.Excel.plist
  4. ~/Library/Preferences/com.microsoft.language_registration.plist
  5. ~/Library/Preferences/com.microsoft.office.plist
  6. ~/Library/Preferences/com.microsoft.outlook.database_daemon.plist
  7. ~/Library/Preferences/com.microsoft.PowerPoint.plist
  8. ~/Library/Preferences/com.microsoft.Word.plist
  9. ~/Library/Preferences/Microsoft/

The target directory for these files is: /System/Library/User Template/English.lproj/Library/Preferences/
You also want to add ~/Library/Application Support/Microsoft and set it’s target directory to /System/Library/User Template/English.lproj/Library/Application Support.

This way, when a new local user is created, their Office 2011 preferences are set right off the bat.

A guide to an almost silent deployment of Adobe Acrobat 9

First and foremost, someone at Adobe must really hate Macs, as it’s impossible to silently install Acrobat 9.x or send updates in a scalable method. Tools you’ll need:

  • A basic text/code editor, Terminal works just fine.
  • Apple Packagemaker or Iceberg.
  • Adobe Acrobat 9.0 dmg
  • A machine with Acrobat 9.0 installed

The .dmg/application has to be 9.0 as the application.xml.override does not work for updated versions.

Start by copying the “Adobe Acrobat 9 Pro” folder to another location. In Adobe Acrobat Pro.app/Contents/Resources/AMT/, edit application.xml to contain:
<Data key="Serial" protected="0">YOUR PRODUCT CODE HERE</Data>
<Data key="Registration">Suppress</Data>
<Data key="EULA">Suppress</Data>
<Data key="Updates">Suppress</Data>
Edit/create application.xml.override to contain:


If there is an <Data key=”EULADelay”>0</Data> in application.xml, then remove that key as it overrides the suppress if it is present.

Now it’s time to edit Adobe Acrobat Pro 9.app/Contents/AcroENUPro90SelfHeal.xml

  1. In the first array, all of the installs besides AUM can be set to “NO” and AUM’s install key must be “REQUIRED” otherwise Acrobat thinks it has a broken version (even if you install the files it wants to their respective locations). AUM’s key should like

    And the other keys in THIS ARRAY should have

That was the tricky part, now we want to write a shell script that moves the Adobe Acrobat Printer files into their correct locations. This will install the printers without bothering the user. The script should look something like:
PDEplugin=$printerfolder/PPD\ Plugins/AdobePDFPDE900.plugin

/bin/cp $PDEplugin /Library/Printers/PPD\ Plugins/
/bin/cp $ADPDF9 /Library/Printers/PPDs/Contents/Resources/en.lproj/
/bin/cp $pdf900 /usr/libexec/backend/

/bin/cp $ADPDF9ja /Library/Printers/PPDs/Contents/Resources/ja.lproj/
/bin/cp $ADPDF9ko /Library/Printers/PPDs/Contents/Resources/ko.lproj/
/bin/cp $ADPDF9cn /Library/Printers/PPDs/Contents/Resources/zh_CN.lproj/
/bin/cp $ADPDF9ct /Library/Printers/PPDs/Contents/Resources/zh_TW.lproj/

/usr/sbin/lpadmin -p AdobePDF9 -E -P /Library/Printers/PPDs/Contents/Resources/en.lproj/ADPDF9.PPD -v pdf900://distiller/ -D “Adobe PDF 9.0”

exit 0
Next we make the package. In your favorite packaging tool, drag/drop the edited version of acrobat. Also copy:
/Adobe Acrobat 9 Pro/Adobe Acrobat Pro.app/Contents/MacOS/SelfHealFiles/Library/Internet Plug-Ins/AdobePDFViewer.plugin to /Library/Internet Plug-Ins/
include /Library/Application Support/Adobe/Acrobat/SHExpectedMissingFileTypes.plist and /Library/Application Support/Adobe/Acrobat/AcroENUPro90SelfHeal.xml in the package.

The way I deploy the newly created Acrobat pkg is that I scp it over to clients with either ARD, or synctool. And then I run the following command: sudo installer -verbose -dumplog -pkg ${PACKAGE} -target / > install_acrobat.log. Otherwise I deploy the pkg in the initial image.
This is all great, however, it’s not completely silent. On it’s intial launch (by each user) Acrobat will for authentication. This is really really dumb, it’s writing to ~/Library and doesn’t need to authenticate, and the user can just hit cancel. Nonetheless, that’s why this post’s title reads “An almost silent install of Adobe Acrobat 9.0”. The second issue is that now that we’ve installed 9.0, we still have to update it. I’ll leave that for another time.

There are quite a few sites I referenced to create this documentation and they are:
[1] http://www.brunerd.com/blog/2010/02/05/make-acrobat-pro-9-for-mac-shut-the-hell-up/
[2] http://www.mombu.com/computer_design/acrobat/t-silent-install-of-acrobat-9-pro-2880140.html
[3] http://www.afp548.com/forum/viewtopic.php?showtopic=27211
[4] PackageMaker: How To

And this is all dandy as Acrobat X is just around the corner, and it’s suppose to be deploy-able via ARD.