Programatically Uninstall Outlook Patch KB2412171

The January 10, 2011 patch described at KB2412171 often causes Outlook to crash.   CrashError The uninstall is problematic because the name of the patch in the registry is dependent on the version of Outlook.  Microsoft tier 3 support gave us the following advice for a command line:

%windir%\System32\msiexec.exe /package <Office 2007 product code> /uninstall <patch code for the MSP from KB2412171> /Q /L*V %temp%\Remove_KB2412171.log Product codes (or “GUIDs”) for Office 2007 and Outlook 2007 are as follows: Standard: {90120000-0012-0000-0000-0000000FF1CE} Professional: {90120000-0014-0000-0000-0000000FF1CE} Professional Plus:{90120000-0011-0000-0000-0000000FF1CE} Enterprise:{90120000-0030-0000-0000-0000000FF1CE} Outlook 2007 Standalone: {90120000-001A-0000-0000-0000000FF1CE} Patch codes for the MSP files related to KB2412171 are as follows: {7961E819-93A5-40A8-8469-4BE2FBBFACEF}  (for the original patch) {752A0B7C-BD24-4362-AC86-AB63FEE6F46F} (for the re-release patch)

The problem is you have six different possibilities for each patch uninstall.  Along the way I discovered that once you uninstall the re-release patch, you will roll-back to the original patch.  Microsoft recommended we uninstall both, and my response was to write UninstallOutlook2412171.vbs which does that.  The script uninstalls first the re-release patch, then the original patch for all versions of Outlook.  If you look at the code you will see that it works by looking for the patch number in the uninstall key, then reads out the uninstall command and runs it with additional switches.  I left the temp path for the log, added a version number (ex:Remove_KB2412171_v1.log), but changed the command line for basic log level.  The verbose logging generated a 43 mb log. Note that it must be run locally with admin rights.  We have it in an SCCM package. Note that we have seen some issues with uninstalling this patch both manually and programmatically.  Also, there have been reports that when LiveMeeting was installed in between patches that it may need to be repaired or reinstalled.

UPDATE 1/22/11: Our testing showed that the script was always returning an exit code of zero because I had used the “run” method of the scripting shell.  To capture the errors, I changed the script to use the “exec” method.  This allowed us to see in SCCM that that we had msiexec 1603 errors.  We discovered that this occurred when Outlook 2007 was installed using the Office Customization tool and Windows Installer 4.5, based on the 1603 error and “DEBUG: Error 2259: Database: Table(s) Update failed” in the installer logs as described in KB970320 . The interaction between these two variables are addressed in a hotfix described in Knowledge Base KB981669.   

We downloaded the hotfix and ran it on two machines.  We verified that Windows installer version was 4.5 was on the system and that we could see KB2412171 in the Add/Remove programs window. We rebooted machines first then ran the hotfix KB981669.  This called for a reboot once complete.  We then verified that KB2412171 still existed in the Add/Remove programs window.  We then ran the new script (link below) to remove two versions of KB2412171.   It successfully ran and removed both systems. 

We are installing the hotfix with the command: WindowsXP-KB981669-x86-ENU.exe /quiet /norestart /log:%temp%.  We let SCCM take care of the reboot.

The revised script, which captures the installer error messages, is UninstallOutlook2412171_v2.vbs.  You must use cscript to launch this version.  Also available for download is UninstallOutlook2412171_v21.vbs, which cleans up the coding and adds a lot of remarks in the code for clarity.  There are no functional changes, but I have not tested this newer code.

Note that my part in this activity was limited to the script writing.  Microsoft and other Veterans Affairs IT staff across the US worked long hours to get this done.  The VA has some very talented IT professionals working for it.  It is an honor to work with them and to serve those who have served the United States.

About Alan

This entry was posted in Patching, Scripting, VbScript, Windows Administration. Bookmark the permalink.

2 Responses to Programatically Uninstall Outlook Patch KB2412171

  1. wullxz says:

    How do you prevent this update from beeing installed automatically again?

  2. Alan says:

    Good question. If you use WSUS or SCCM you can remove it from the list of patches distributed. If are using automatic patching, it may continue to reapply. Microsoft offers free support for patching problems. They may have a way to do this for you.

Leave a Reply