Office 2008 for InstaDMG Tutorial
I recently decided to start over on my Office 2008 package (I was making a custom updated .pkg for it using Composer, but I decided it
wasn't the best way to do it).
Here is what I came up with!
You will need the follow installers:
Office 2008 SP2 (This should be obtainable from Microsoft via MSDN or other channels perhaps).
Office 2008 12.2.5 Update - (Found here: http://www.microsoft.com/mac/downloads.mspx )
Mosen's OfficeOfficeUpdate.app - https://www.afp548.com/filemgmt/index.php?id=84&comments=1
As well as the following Settings from an Office 2008 install that has already been set up for your organziation with generic user info:
/Applications/Microsoft Office 2008/Office/OfficePID.plist
~/Library/Preferences/com.microsoft.office.plist
~/Library/Preferences/com.microsoft.autoupdate2.plist
~/Library/Preferences/com.microsoft.setupassistant.plist
~/Library/Preferences/Microsoft/Office 2008/Microsoft Office 2008 Settings.plist
~/Library/Preferences/Microsoft/Office 2008/Office 2008 First Run
For the Office 2008 Installers, the process is very quick and painless.
1. Mount the Office 2008 SP2 ISO and dump the Office Installer.mpkg into the InstaUp2DatePackages folder.
2. Mount the Office 2008 12.2.5 Update and drag the update into the same folder at PatchOfficeUpdate.app.
3. Drag the Office 2008 12.2.5 update onto PatchOfficeUpdate.app and it will modify it for use with InstaDMG.
4. Place the Office 2008 12.2.5 update into the InstaUp2DatePackages folder.
5. Add The Office Installer.mpkg as well as the Office update to a InstaUp2Date catalog of your choice.
The settings:
Note: The settings can be delivered using a package like I outline below, or by using Open Directory with MCX or even local MCX. It doesn't really matter how the settings get there, just so that they are present.
1. Make a package to deliver the settings referenced above. All the ~/Library/Preferences stuff needs to go to the User Template (/System/Library/User Template/English.lproj/Library/Preferences)
2. For the OfficePID.plist, if you want to customize office for each user, edit the file, delete its contents and then make sure that the permissions on the file deny access to it to everyone (chmod 000). If you just want generic info for first/last name just edit the file and deliver it as is.
3. The last part that I choice to do for our organization is to customize the First/Last name that shows up for each user. To do that we will use a first run only login script for each user.
4. Deliver a launchd item to the User Template location '/System/Library/User Template/English.lproj/Library/LaunchAgents/com.company.personalizeoffice.plist'
5. Make the content of that file as foillows:
[Code]
Label
com.company.personalizeoffice
ProgramArguments
/Library/Scripts/company/personalizeoffice.sh
QueueDirectories
RunAtLoad
WatchPaths
[/code]
6. Then we need the script itself. I use Active Directory for logging in, so the Realname gets set by whatever info is in AD. You will most likely need to tweak this script to work in your environment. The script goes in /Library/Scripts/company/personalizeoffice.sh and it has the following contents:
[code]
#!/bin/bash
username=$(whoami)
firstname=$(dscl . read /Users/$username RealName | awk ' NR > 1 {print $2}')
lastname=$(dscl . read /Users/$username RealName | awk ' NR > 1 {print $1}' | tr -d ',')
/usr/libexec/PlistBuddy -c "Set :1000 '$firstname $lastname'" ~/Library/Preferences/Microsoft/Office\ 2008/Microsoft\ Office\ 2008\ Settings.plist
rm ~/Library/LaunchAgents/edu.company.personalizeoffice.plist
[/code]
The script will pull the RealName using dscl, then try to grab the first and last name and store them in a variable. Then, using PlistBuddy we set the first and last name in the Office Settings file for the user. Finally, the script deletes the LaunchAgent so that it does not run again.
Thats about it! So long as you have all those settings files in place via either a Package in InstaDMG or via MCX, you should be set. Office will open without any first run screens or bugging of any sort.