Home > Mac administration, Office 2011 > Removing the Office 2011 installers’ application quit function

Removing the Office 2011 installers’ application quit function

The Microsoft Office 2011 installer and Office 2011 update installers include functionality to force browsers and Office applications to close before the installation runs. This functionality can be helpful if you’re installing Office 2011, but more often then not is a headache to Mac admins who want to remotely deploy the installer(s).

The script that controls the application quitting function is embedded in one of the Office 2011 installers’ included installer packages. To fix this, the embedded installer package in question needs to be edited to remove the script’s contents. See below the jump for the procedure.

1. Open Terminal and run the following command to expand the contents of the Office installer or update installer package into a new directory. In this example, I’m expanding the contents into a director named office_edit


pkgutil --expand "/path/to/Office 2011 Installer.pkg" office_edit

Screen Shot 2012-09-26 at 9.32.02 AM

This should create a directory named office_edit with a number of installer packages inside. The problem script will be inside the package whose name includes all_quit.

Screen Shot 2012-09-26 at 8.40.44 AM

2. Run the following command to edit the script (adjusting for current name of the all_quit installer package):


pico /path/to/office_edit/Office2011_all_quit_14.2.x.combo.pkg/Scripts/preinstall

Screen Shot 2012-09-26 at 9.29.12 AM

3. Replace all of the script’s current contents with the following content:

#!/bin/bash
 
exit 0

Screen Shot 2012-09-26 at 9.29.28 AM

The exit 0 will cause the script to exit immediately without causing other ill-effects.

4. To convert the directory back into an installer package, run the following command:


pkgutil --flatten office_edit "/path/to/Office 2011 Installer.pkg"

Screen Shot 2012-09-26 at 9.31.14 AM

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.

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.

  1. September 30, 2012 at 8:50 pm

    I noticed that expanding and the flattening the package back changes the permissions for all the PackageInfo files and for the folder icon was not getting changed.

    Do you see the same behavior?

    • October 1, 2012 at 12:18 pm

      Noel,

      I’m seeing the same behavior for the PackageInfo files that you have seen, where the executable bit is removed from PackageInfo files (http://nbalonso.com/files/prepare-office-sp2-for-instadmg.html). It appears that the Office 2011 folder icon is being applied properly when I install it using a DeployStudio postponed install. Are you seeing something different?

      • October 1, 2012 at 9:34 pm

        Maybe I missed to refresh the view in Finder or is a problem affecting InstaDMG.

        In either case the replacement for MS’s Python script written in bash works for me (:

  2. Rick W
    December 2, 2013 at 5:32 pm

    I’m noticing that this appears to not work as it has in the past on the Office update for 14.3.9. I made the changes as above like I’ve done prior, however, it immediately wants to close apps upon launch after you flatten the package again. Has anyone else noticed this issue?

  3. Darrin
    December 4, 2013 at 9:12 pm

    I’ve seen this article mentioned a lot lately, would like to give it go, but am nervous about how stable the applications will be if they are updated while running. There are plenty of users that don’t’ quit apps or even log out for days at a time. We’re just starting to use Outlook and that’s what I’m most worried about. Just looking for confirmation I guess that this is ‘nothing to worry about’… ?

  4. jhbush
    April 9, 2014 at 5:08 pm

    Rick W, just tested this out on the 14.4.1 update and removing the quit doesn’t seem to work.

  5. April 15, 2014 at 8:46 pm

    FWIW, I’m testing this by keeping the original no-quit package where it is, but specifying that the installer *not* run it through a custom choices.xml call (http://www.officeformachelp.com/office/administration/deployment/command-line) and the Office installer still appears to quit Safari (and try to quit Office applications). Suspect MS is doing something fishy here…

  6. Lindell
    July 15, 2014 at 2:08 pm

    Thanks for your work on this Rich. While trying to get to the bottom of this issue, I took your lead and examined the preinstall script above. I noticed when it’s being run from a command line it’s attempting to SU to root. Like Rich we redirect root’s shell to /usr/bin/false which seemed to be causing the failures. So rather than modify the install package and every update that MS releases, I simply run a pre and post script as part of our JSS Self Service policy that sets root’s shell to /bin/sh for the install then back to /usr/bin/false when it finishes. This has been working great so far.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 143 other followers

%d bloggers like this: