Patch Wrapper Improvements

A new patch wrapper will be shipping for patches targeting the Microsoft .NET Framework 2.0 and Visual Studio 2005. A lot of work went into simplifying the wrapper and removing managed code, as well as standardizing the command-line options.

The previous patch wrapper for the .NET Framework 1.0 and 1.1, and Visual Studio .NET 2002 and 2003, supported the following command-line options:

  • /? – Shows help information.
  • /I – Installs the patch.
  • /Q – Installs the patch with no user interface (quiet mode).
  • /L:logfile – Specifies the path to the log file.
  • /Ld – Log package details.
  • /Lp – Log affected products.
  • /Lf – Log included files.
  • /Xp[:path] – Extract .msp file to the specified path.

Because the patch wrapper actually reconstituted the .msp while extracting via the /Xp command-line option you couldn’t just grab the .msp out of the patch using an unzip application. Doing so will result in an unusually small .msp file that will not install correctly.

Starting with new patches the patch wrapper itself supports the following command-line options:

  • /help, /h, /? – Shows help information.
  • /extract [directory] – Extract the .msp to the specified directory.
  • /q, /quiet – With /extract extracts the package with no user interface (quiet mode).
  • /uninstall – Uninstalls the wrapped patch.

All other command-line options are passed to msiexec.exe so any syntax errors will display the Windows Installer usage dialog that describes the Windows Installer command-line options as well as the standard installer command-line options beginning with Windows Installer 3.0.

So why is a wrapper needed? The new wrapper compresses the whole .msp file since any streams are not compressed. This decreases the patch download size. Because .msp files can contain a pair of transforms for multiple products and some of our patches will for Visual Studio, if the patch applies to multiple products installed on the machine but a reboot is required Windows Installer will prompt for a reboot. The user will have to re-apply the patch until it’s installed for every applicable product. The wrapper eliminates this burden by catching the return code ERROR_SUCCESS_REBOOT_REQUIRED (3010) and prompts when the patch has finished apply to each applicable product. If the patch is installed silently the machine is automatically rebooted.

With the new wrapper you can currently use an unzip application but we recommend that you use /extract to extract the patch.