Source Resolution during Patch Uninstall

Source Resolution during Patch Uninstall

  • Comments 12

There are a number of guidelines to prevent requiring source media for patch installation. These guidelines can also help prevent requiring source media during patch uninstall, but there are a number of caveats.

Recall from Rebuilding the Installer Cache that the baseline cache contains files that were replaced. But files that get replaced don't always get copied to the baseline cache. When uninstalling the patch, since these files aren't in the baseline cache, the original source media is required. If the source media isn't available in the registered cache locations, a prompt during UI installs will occur or the installation will fail during silent installations.

A file may not be cached in the baseline for a number of reasons:

  1. A file was updated in the patch (the Attributes column in the File table included the msidbFileAttributesPatchAdded (0x1000) attributed) but the file on disk was identical and unmodified. When the patch is uninstalled, Windows Installer will attempt to reinstall the original file because the patch file is being removed.
    1. This could be caused by another patch – perhaps even for another product – that already updated the file.
    2. This could also be caused by a file being included in the patch that is not actually updated from the target from which the patch was built.
  2. Native assemblies are installed using the MsiAssembly and MsiAssemblyName tables. Windows Installer delegations to fusion (fusion.dll for managed assemblies; sxs.dll for native assemblies) to install files, but fusion cannot report back the manifest and catalog locations. Sine these locations are unknown to Windows Installer, it cannot cache these files in the baseline.

There's quite a bit of information available in a verbose installation log, but for specific reasons why a file isn't cached in the baseline cache you must enable debug logging as well, by passing the "x" parameter to the logging command switch for Windows Installer 3.0 and newer, such as in the following example:

msiexec.exe /i {BDEFF59A-9751-4023-BEDB-F6501B97ACA2} /L*vx patch.log PATCH=example.msp

You can also set the debugging system policy in addition to the logging system policy.

After the final patch application order, you will find that file information is saved for files that will be replaced. During CostInitialize the baseline caches and files are enumerated, and during InstallFinalize (or whenever deferred actions are run for InstallFiles and related actions) you'll find operations to perform the actual baseline caching. Each will precede the file copy operations, so if there is no baseline caching operation logged for a file before a file copy operation, the file has not been cached for that product and uninstalling the patch must resolve source, which you'll see logged starting with "Resolving Source" in a verbose log.

Leave a Comment
  • Please add 7 and 3 and type the answer here:
  • Post
  • Heath,

        With regard to the reasons in 1) listed above, is there a way to force Windows installer to cache the file always?


  • Not without eliminating shared components, which also implies those files in each product need to go to different install locations since the baseline cache is per-product, based on the ProductCode.

  • Heath,

     I couldn't find the answer for this in msn forums so asking you:

    - Say that we have VS2005 + SP1 installed on all systems + 1 hotfix that was released after sp1. For a "Repair" event, will Windows Installer need all three of these files -or- are they all cached properly so that no installation media will be needed?

  • Teoman, MSPs are always cached in whole as described in When you repair a product, if any patches are installed and active (not superseded) they are brought into view, transforming the original product.

    If files are missing that were not in the patch during a repair, source may be required. Any files that are patched will be obtained from the cached MSPs.

  • Visual Studio 2005 Service Pack 1 can take a long time to install and may apply to multiple products

  • When you install a patch using Windows Installer, the .msp file is cached in the %WINDIR%\Installer directory.

  • The What's New section of the Windows Installer 4.5 CHM available in the downloads section of the Windows

  • It might be tempting to schedule the ResolveSource action , but ResolveSource actually requires that

  • It might be tempting to schedule the ResolveSource action , but ResolveSource actually requires that

  • As Developer Division starts to ship patches for the Visual Studio 2008 , some users are being prompted

  • Windows Installer is an engine for performing transactional installations. When installing a product

  • When I announced that Visual Studio 2008 SP1 RTM will install over SP1 beta , we were on track to make

Page 1 of 1 (12 items)