• MSI Restart Manager - How it relates to Office updates and application restarts

    Windows Installer 4.x and later includes the “MSI Restart Manager” which is designed to reduce required operating system reboots during Installer maintenance mode operations, by restarting applications rather than rebooting the operating system.

    A typical Office update scenario where the MSI Restart Manager is used may be similar to the following:

    1) Windows 7 machines have Office 2010 installed.
    2) Using a sample update named KBxxxxxx.exe, extract the MSP files from the executable using a command line similar to the following (run the executable with the /? switch to see all available switches):

    <path>\KBxxxxxx.exe /extract:<path>

    3) A customer deploys an Office update during the business day or during off hours, prior to rebooting machines/ensuring that no Office applications are in use, using a command line similar to the one below:

    %windir%\System32\msiexec.exe /P <path>\POWERPNT.msp REBOOT=ReallySuppress /L*V <path>\POWERPNT.log /QN

    4) If a user has PowerPoint and a related document open at this point, an expected reboot will not be called for or suppressed.
    5) Instead, the MSI Restart Manager is invoked, closes PowerPoint, allows files in use to be updated without a reboot, and reopens PowerPoint.
    6) The resulting behavior is that, upon restart, PowerPoint’s auto recovery functionality has saved the file that was previously open, and the user is prompted how they want to proceed with the auto-recovered file.

    In order to prevent the application restart from occurring and disable the MSI Restart Manager, a command line similar to the following can be used:

    %windir%\System32\msiexec.exe /P <path>\POWERPNT.msp REBOOT=ReallySuppress MSIRESTARTMANAGERCONTROL=Disable /L*V <path>\POWERPNT.log /QN

    It is important to note that if the MSI Restart Manager is disabled, a reboot is suppressed, and Office files to be updated are in use, changes to files will not occur until after the machine is rebooted (this would be a scenario where the log file ends with a return code of 3010).

    The screenshots below illustrate the behavior which occurs when installing updates while Office apps are open, with and without the MSIRESTARTMANAGERCONTROL=Disable property being set.

    1) If the MSI Restart Manager is not disabled, and the update process is run in quiet mode versus silent mode (“/QB” vs. “/QN”), the user will be prompted to close open applications:

     

     2) If the MSI Restart Manager is not disabled, and the update process is run in quiet mode, with only reboots suppressed, open Office applications will automatically be restarted. Upon restart, open documents will be auto saved and auto recovered.

     

    3) Clicking the “Recovered” button will result in the Document Recovery pane being displayed, and the user will be prompted as to which copy of the document that they wish to save.

     

     

    4) If the MSI Restart Manager is disabled, the update process is run in silent mode, and reboots are suppressed, Office applications will not be restarted, but the resulting log file will contain a 3010 exit/return code (see attached LogFile.zip and the KB2464594.log file that it contains).

      

    See the following articles for additional information on the MSI Restart Manager and the MSIRESTARTMANAGERCONTROL property:

    Using Windows Installer with Restart Manager
    http://msdn.microsoft.com/en-us/library/aa372466.aspx

    MSIRESTARTMANAGERCONTROL Property
    http://msdn.microsoft.com/en-us/library/aa370377.aspx

  • How to programmatically install the PowerPoint 2003 hotfix related to KB2543241 and KB2464588

    If you have installed the KB2464588 update for Microsoft PowerPoint 2003, which is related to Microsoft Security Bulletin MS11-022, you may be aware of/experiencing the following known issues:

    When you open presentations that contain layouts with background images in PowerPoint 2003, an error may occur. When the error occurs, you receive a message that states that some contents (text, images, or objects) have corrupted. You can determine what content has been lost by viewing the layout, but not by viewing the slide content. Items that were removed will display a blank box or a box that contains "cleansed."

    The KB2543241 hotfix was created to alleviate these issues. The following steps can be used to install the KB2543241 hotfix in a manner that is conducive to an enterprise environment (i.e., via command line, silently, and requiring no user interaction):

    1) Extract the MSP file from the KB2543241 executable, by using a command line similar to the following ("C:\KB2543241" is an example of a path where files could be extracted to):

    <path>\office2003-KB2543241-ENU.exe /C /T:C:\KB2543241 /Q

     2) Attempt to silently install the KB2543241 MSP file, generate a verbose installation log, and suppress reboots using a command line similar to the following (change "/QN" to "/QB" to display only a basic progress indicator):

     %windir%\System32\msiexec.exe /P C:\KB2543241\POWERPNT.msp REBOOT=ReallySuppress /L*V C:\KB2543241\KB2543241.log /QN

     3) Check the end of the verbose log file (i.e., KB2543241.log) for a return code. A value of zero indicates success with no further action required. A return code of 3010 also indicates a successful installation of the MSP file, but a reboot is required to complete the update process.

    4) See http://msdn.microsoft.com/en-us/library/aa368542(v=vs.85).aspx for additional info on Windows Installer return/error codes.

    5) Machines with Windows Installer 4.x and later (Windows 7 ships with Installer 5.x) contain functionality provided by the MSI Restart Manager. The design of the MSI Restart Manager is to reduce required system restarts caused by required files being in use during a maintenance mode or update process.

    6) With the MSI Restart Manager, if a file that is to be updated is held in use by another process or application (i.e., PowerPnt.exe), that application is restarted in order to allow for an "on the fly" update.

    7) This has the potential to cause issues with open Office applications, which may be unexpectedly restarted. To prevent applications from being restarted, a command line similar to the following can be used:

     %windir%\System32\msiexec.exe /P C:\KB2543241\POWERPNT.msp REBOOT=ReallySuppress MSIRESTARTMANAGERCONTROL=Disable /L*V C:\KB2543241\KB2543241.log /QN

     8) It is important to note that if the MSI Restart Manager is disabled, a reboot is suppressed, and Office files to be updated are in use, changes to files will not occur until after the machine is rebooted (this would be a scenario where the log file ends with a return code of 3010).

    9) See the following articles for additional info on the MSI Restart Manager:

    MSI Restart Manager - How it relates to Office updates and application restarts
    http://blogs.technet.com/b/odsupport/archive/2011/04/29/msi-restart-manager-how-it-relates-to-office-updates-and-application-restarts.aspx

    Using Windows Installer with Restart Manager
    http://msdn.microsoft.com/en-us/library/aa372466.aspx

    MSIRESTARTMANAGERCONTROL Property
    http://msdn.microsoft.com/en-us/library/aa370377.aspx

    10) For further information on the KB2543241 and KB2464588 updates & hotfixes, see the following blog posts, articles, and bulletin:

    Office Sustained Engineering and Release Team Blog post, "Issues after installing PowerPoint 2003 update KB2464588"
    http://blogs.technet.com/b/office_sustained_engineering/archive/2011/04/23/issues-after-installing-powerpoint-2003-update-kb2464588.aspx

    KB2543241 Description of the PowerPoint 2003 hotfix package
    http://support.microsoft.com/kb/2543241

    Office Sustained Engineering and Release Team Blog post, "April 2011 Office Security Update Release"
    http://blogs.technet.com/b/office_sustained_engineering/archive/2011/04/12/april-2011-office-security-update-release.aspx

    Microsoft Security Bulletin MS11-022 - Important
    Vulnerabilities in Microsoft PowerPoint Could Allow Remote Code Execution (2489283)
    http://www.microsoft.com/technet/security/bulletin/MS11-022.mspx

    KB2464588 MS11-022: Description of the security update for PowerPoint 2003: April 12, 2011
    http://support.microsoft.com/kb/2464588

  • How to programmatically install the Outlook 2007 hotfix related to KB2512788 and KB2509470

    After installing the April 2011 Public Update for Outlook 2007 (KB2509470), some users have reported difficulty with print previewing messages. The KB2512788 hotfix was created to address these issues.

    The following steps can be used to install the KB2512788 hotfix in a manner that is conducive to an enterprise environment (i.e., via command line, silently, and requiring no user interaction):

    1) Extract the MSP file from the KB2512788 executable, by using a command line similar to the following ("C:\KB2512788" is an example of a path where files could be extracted to):

    <path>\office-kb2512788-fullfile-x86-glb.exe /extract:C:\KB2512788 /Q

    2) Attempt to silently install the KB2512788 MSP file, generate a verbose installation log, and suppress reboots using a command line similar to the following (change "/QN" to "/QB" to display only a basic progress indicator):

    %windir%\System32\msiexec.exe /P C:\KB2512788\outlook-x-none.msp REBOOT=ReallySuppress /L*V C:\KB2512788\KB2512788.log /QN

    3) Check the end of the verbose log file (i.e., KB2512788.log) for a return code. A value of zero indicates success with no further action required. A return code of 3010 also indicates a successful installation of the MSP file, but a reboot is required to complete the update process.

    4) See http://msdn.microsoft.com/en-us/library/aa368542(v=vs.85).aspx for additional info on Windows Installer return/error codes.

    5) Machines with Windows Installer 4.x and later (Windows 7 ships with Installer 5.x) contain functionality provided by the MSI Restart Manager. The design of the MSI Restart Manager is to reduce required system restarts caused by required files being in use during a maintenance mode or update process.

    6) With the MSI Restart Manager, if a file that is to be updated is held in use by another process or application (i.e., Outlook.exe), that application is restarted in order to allow for an "on the fly" update.

    7) This has the potential to cause issues with open Office applications, which may be unexpectedly restarted. To prevent applications from being restarted, a command line similar to the following can be used:

     %windir%\System32\msiexec.exe /P C:\KB2512788\outlook-x-none.msp REBOOT=ReallySuppress MSIRESTARTMANAGERCONTROL=Disable /L*V C:\KB2512788\KB2512788.log /QN

    8) It is important to note that if the MSI Restart Manager is disabled, a reboot is suppressed, and Office files to be updated are in use, changes to files will not occur until after the machine is rebooted (this would be a scenario where the log file ends with a return code of 3010).

    9) See the following articles for additional info on the MSI Restart Manager:

    MSI Restart Manager - How it relates to Office updates and application restarts
    http://blogs.technet.com/b/odsupport/archive/2011/04/29/msi-restart-manager-how-it-relates-to-office-updates-and-application-restarts.aspx

    Using Windows Installer with Restart Manager
    http://msdn.microsoft.com/en-us/library/aa372466.aspx

    MSIRESTARTMANAGERCONTROL Property
    http://msdn.microsoft.com/en-us/library/aa370377.aspx

    10) For further information on the KB2509470 and KB2512788 updates & hotfixes, see the following blog posts and articles:

    Office Sustained Engineering and Release Team Blog post, “Issues after installing Outlook KB KB2509470"
    http://blogs.technet.com/b/office_sustained_engineering/archive/2011/04/28/issues-after-installing-outlook-kb-kb2509470.aspx

    KB2512788 Description of the Office Outlook 2007 hotfix package (Outlook-x-none.msp): April 26, 2011
    http://support.microsoft.com/kb/2512788

    Office Sustained Engineering and Release Team Blog post, "April 2011 Office Security Update Release"
    http://blogs.technet.com/b/office_sustained_engineering/archive/2011/04/12/april-2011-office-security-update-release.aspx

    KB2509470 Description of the Extended Protection for Authentication update for Outlook 2007
    http://support.microsoft.com/kb/2509470

  • How to automate the uninstallation of an Office patch programmatically

     

    We can automate the silent uninstallation of Office patches via a command line like so:

    %windir%\System32\msiexec.exe /package {Office GUID} /uninstall {Patch GUID} /QN

    First we will need to determine what the GUID is for Office, and next what the GUID is for the patch that we are trying to uninstall.
    To determine what the GUID is for the installed version of Office, look in the uninstall hive in the registry.

    x86 OS
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{GUID}
    x64 OS
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{GUID}

    On my two example machines I have Office 2003, and Office 2007 installed.

    The GUID for Office 2003 will be similar or equal to {90110409-6000-11D3-8CFE-0150048383C9}
    The GUID may be slightly different then what I have listed here. Verify you found the correct GUID by verifying the product under the “Displayname” key listed in the GUID.

    See also - Description of numbering scheme for product code GUIDs in Office 2003
    Here is a screenshot of this registry key on my machine that has Office 2003.

    Capture_thumb[2]

    The GUID for Office 2007 will be similar or equal to {90120000-0011-0000-0000-0000000FF1CE}
    The GUID may be slightly different then what I have listed here. Verify you found the correct GUID by verifying the product under the “Displayname” key listed in the GUID.

    See also - Description of the numbering scheme for product code GUIDs in 2007 Office suites and programs
    Here is a screenshot of this registry key on my machine that has Office 2007.

    Capture

    Notice that there are many GUIDS that end in 0FF1CE in my screenshot above. The reason for this is because Office 2007/2010 is a multi-msi based product, and because of that there is a GUID for each component in Office 2007/2010. So for example if I clicked on {90120000-0015-0000-0000-0000000FF1CE} in my example above the “Displayname” would show “Microsoft Office Access MUI (English) 2007”. This is not the GUID for the Office suite. This is only the GUID for the Access MUI component. For Office 2007/2010 make sure that you find the GUID that has a display name that correlates with the name of the suite. ie.. Microsoft Office Professional Plus 2007, or Microsoft Office Standard 2007 etc..

    Next we need to discover the GUID of the patch we are trying to uninstall. To do this we will want to look at the properties of the MSP file that is contained within the patch .exe.

    First we will need to extract the MSP(s) from the patch executable.

    The method to extract the contents from Office patches has changed since Office 2003.

    To extract the contents from 2003 patches-
    I will download the Office 2003 patch from KB2464588 as an example. (office2003-KB2464588-FullFile-ENU.exe)
    For Office 2003 patches we will need to extract the MSPs from the executable using an extraction command like so to extract the MSPs from this patch executable to the c:\temp directory:
    office2003-KB2464588-FullFile-ENU.exe /c /t:c:\temp

    Capture2

    To extract the contents from 2007 patches-
    I will download the Office 2007 patch from KB2464594 as an example. (PowerPoint2007-KB2464594-fullfile-x86-glb.exe)
    For Office 2007 patches we will need to extract the MSPs from the executable using an extraction command like so to extract the MSPs from this patch executable to the c:\temp directory:
    PowerPoint2007-KB2464594-fullfile-x86-glb.exe /extract:c:\temp

    Capture3

    Now that we have the MSP from the patch executable we need to find the GUID of the patch.

    We can find this by right clicking on the msp and going to properties. We will be looking for the revision number.
    Sometimes there will be a lot of numbers in the revision number section. Copy/paste the list of revision numbers into notepad, and delete all but the first one. The first number in the list of revision numbers is the GUID.

    *note* - In Vista you will not be able to find the GUID this way.

    So using the POWERPNT.MSP file from KB2464588 as an example we discover that the GUID for this patch is {AB0D3DA9-FC93-4F57-ADE2-B6669749B25E} because that is the first number in the revision number properties.

    From Windows XP:

    revision

    From Windows 7:

    revision2

    So now we know that the Office 2003 suite GUID in my example is {90110409-6000-11D3-8CFE-0150048383C9}, and we know that the GUID for the Office 2003 patch from KB2464588 is {AB0D3DA9-FC93-4F57-ADE2-B6669749B25E}. So the command that could be used to programmatically remove this patch would be:

    %windir%\System32\msiexec.exe /package {90110409-6000-11D3-8CFE-0150048383C9} /uninstall {AB0D3DA9-FC93-4F57-ADE2-B6669749B25E} /qn

    *note*
    You could use /qb for an automated uninstall with a progress bar, or use /qn for a totally silent uninstall.

    We found that the GUID for Office 2007 in my example above was {90120000-0011-0000-0000-0000000FF1CE}, and the GUID for the Office 2007 patch KB2464594 is {E6B7C11E-21E9-4BA0-9677-29AD603B953C}.

    revision3

    So the command that could be used to programmatically remove this Office 2007 patch would be:

    %windir%\System32\msiexec.exe /package {90120000-0011-0000-0000-0000000FF1CE} /uninstall {E6B7C11E-21E9-4BA0-9677-29AD603B953C} /qn

    *note*
    You could use /qb for an automated uninstall with a progress bar, or use /qn for a totally silent uninstall.

    FAQ-

    How can we determine if the patch is installed programmatically if we know the GUID of the patch?
    A- This can be done once we convert the patch GUID to a compressed GUID. (How to convert an Office GUID, or Office patch GUID to a compressed GUID)
    Then query for the compressed GUID at this registry location:

    HKEY_CLASSES_ROOT\Installer\Patches\

    So for example the patch GUID for KB2464588 is {AB0D3DA9-FC93-4F57-ADE2-B6669749B25E}. Once converted we find that the compressed GUID is 9AD3D0BA39CF75F4DA2E6B6679942BE5.

    So if KB2464588 is installed the following registry key would exist:

    HKEY_CLASSES_ROOT\Installer\Patches\9AD3D0BA39CF75F4DA2E6B6679942BE5

    Is it possible to uninstall a patch that is not natively uninstallable?
    A- While it is not recommended, nor supported by Microsoft it is possible to uninstall patches that are marked as not uninstallable. Once again we will need to convert the patch GUID to a compressed GUID. (How to convert an Office GUID, or Office patch GUID to a compressed GUID)
    Using the same example above we know that KB2464588 has a compressed GUID of 9AD3D0BA39CF75F4DA2E6B6679942BE5. The registry key that determines whether or not this patch is uninstallable will be located here:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\[Office guid]\Patches\9AD3D0BA39CF75F4DA2E6B6679942BE5

    "Uninstallable"=dword:00000001

    If the patch is not uninstallable natively, it would be possible to change the "Uninstallable" value at this registry location to “1” and then the patch would be available to uninstall.

    We have a patch that has multiple MSP files inside of it. Is this normal? Would we need to uninstall them all?
    A- It is not uncommon for Office patches to contain multiple MSP files. If you wanted to completely remove the patch you would need to uninstall each of the MSPs.

    It is also not uncommon for Office patches to apply to multiple products and as such show up multiple times in Add/Remove. In these cases to completely remove the patch you would need to run the uninstall command targeting the GUID for each Office product that has the patch installed.

  • How to extract the contents from an .ISO file without burning the .ISO to disc.

     


    When Office products are downloaded from the Volume License Service Center they come down as .ISO files. .ISO is not a file format that Windows can open natively.

    An ISO file is an image of a CD/DVD. Typically you would be able to use a burning program like Nero, or ImgBurn, to then burn that ISO file directly to a disk.

    How do I use .ISO files?

    Once you have downloaded an .ISO file, there are several possible options you can use to install the software:

      1. Use .ISO image file software to download and save the .ISO image file to a CD-R or a DVD-R.
        If you are planning to install an Operating System on a PC or install software across multiple machines, this is one of your best options. A CD/DVD gives you the flexibility to make clean installs and to be used as a “boot CD.”
        If you are using a PC with Windows 7, you don’t need any additional software to burn a CD-R or DVD-R. Simply double click on the .ISO file you downloaded, and then follow the steps in the Image Burner Wizard.
        If you are using any other Operating System, you may need additional software. If your computer is equipped with a CD/DVD burner, this software is probably already loaded on your PC. Most CD-R/DVD-R writing software enables disk creation from an image file. Select a menu item such as Copy Image to CD or Burn Image to access this feature. For detailed instructions, see the software’s Help documentation.
      2. Virtually mount and access ISO files as a virtual device.
        If you don’t have a CD/DVD burner installed on your machine or you don’t have media available to you (a blank CD-R/DVD-R), you can “mount” the ISO file as a virtual drive. With this method, your machine will believe that the file is a real disk drive, and you will be able to read files from this “virtual disk.” This approach is advisable only for installation of applications (such as Office) or minor system upgrades. You will not be able to install an Operating System using this approach, because the virtual drive would disappear at some point during the installation.
        There are several software options for the virtual drive approach. Though they have not been tested and are not supported by the VLSC team, customers report that Daemon Tools and Pismo File Mount offer such capability as well as Microsoft Virtual CD Control Tool.
      3. Extract the .ISO files to your hard drive.
        Contents of .ISO image files can be accessed directly using third-party tools that allow file extraction from the file to a temporary folder on your hard drive (similar to .zip files). As with the virtual drive, this approach is advisable to install application software or system upgrades. An example of this approach is the creation of an installation thumb drive to install software on netbooks or other devices with no optical drive.
        The following tools offer .ISO file support:
        Note: While other products may work to manipulate .ISO files, they have not been tested and are not recommended by Microsoft.

    The purpose of this blog will be to demonstrate the usage of my favorite third party freeware program that can be used to “mount” the ISO file and allow the extraction of the contents. 

    As you can see there are many programs that we could use to extract the contents from ISO files, but there are few reasons that I prefer Pismo File mount.

    - Free
    - Easy to use
    - Non invasive

    Let me demonstrate how I use Pismo File Mount to extract the contents from an Office ProPlus 2010 ISO I downloaded from the VLSC.

    1. Downloaded and ran the installer for Pismo File Mount Audit Package.
    2. After the installation, I right click on the ISO file that I had downloaded and choose “Mount Image”

    mount

    3. After mounting the image you will notice that the icon for the ISO has changed and how looks like this:

    mount4

    We can now double click on this and it will open like so:

    mount3

    Now we will want to select all and copy the contents to another local folder on the machine.

    4. After I have copied the contents to another folder on the machine, I will “unmount” the ISO so that it is no longer in use by Pismo File Mount.

    unmount 

    Now that I have the contents extracted I can delete the ISO and copy the contents to a network share, burn to a disc, or copy to a thumbdrive for installation on other machines. At this point I uninstalled Pismo File Mount.

    Note: While this blog article is written with ISO files in mind, it also pertains to .IMG files.