Office 2008 Settings

From AFP548 Wiki
Jump to: navigation, search

In order to configure Office 2008 and not have it run the setup assistant, some settings must be put into place on your InstaDMG image.

These settings include:

/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

The easiest way to configure these settings is to install Office 2008 on a machine, run the setup assistant on a clean account and then grab these files after it is completely configured.

After you have the settings you need and they are configured as desired, you need to deliver them to your computers. You can do this by making a package that installs them to the InstaDMG image or you could even manage them using MCX with Open Directory.
This is all you need to do in order to get it to not prompt users with the setup assistant. One problem with this approach is that whatever default info you put in OfficePID.plist will be used for every user. If you want to get a little fancy, you could also customize it upon login by a user. Here is an example of what you would do in order to customize it per user.

  • 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).
  • 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).
  • The last part 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.
  • Deliver a launchd item to the User Template location '/System/Library/User Template/English.lproj/Library/LaunchAgents/com.company.personalizeoffice.plist'
  • Make the content of that file as foillows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.company.personalizeoffice</string>
	<key>ProgramArguments</key>
	<array>
		<string>/Library/Scripts/company/personalizeoffice.sh</string>
	</array>
	<key>QueueDirectories</key>
	<array/>
	<key>RunAtLoad</key>
	<true/>
	<key>WatchPaths</key>
	<array/>
</dict>
</plist>
  • 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:
#!/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


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.