December 2nd, 2005

Resolving Prompts for Source

Heath Stewart
Principal Software Engineer

When discussing the Windows Installer cache, I mentioned how cabinet streams are stripped from the .msi file when the Windows Installer package is cached, and how this is a contributing factor to prompts for source. A prompt for source will occur when repairing or patching a product if the source for a file to reinstalled is not present. This results in the Windows Installer error 1706 to be displayed if installing with a user interface and in the log, and the Windows error 1603 (ERROR_INSTALL_FAILURE) to be returned from the process.

Prior to Windows Installer 2.0 the original installation source was always necessary but that was fixed by Windows Installer 2.0. Now by adhering to certain rules you can mitigate prompts for source:

  • Ensure no custom action access the original source location.
  • Populate the MsiFileHash table for un-versioned files.
  • Correctly populate the Version and Language columns in the File table for versioned files.

Using whole files in a patch is also a good idea, but if you can support only Windows Installer 3.0 and newer you can support binary delta patching against a baseline cache that Windows Installer creates for smaller patch size. This allows patches to contain a binary delta between the target and upgrade binary files. For example, a QFE targeting the RTM can contain deltas between the RTM- and QFE-level binaries regardless of other patches that are installed, as long as that patch would supersede any other QFE that patched the same file set. To take advantage of the baseline cache, one must author the MsiPatchSequence table into their .msp file. Administrators can set the maximum size for all baseline caches or even disable it – though not recommended – by setting the MaxPatchCacheSize policy.

Because the .NET Framework 2.0 has to support Windows Installer 2.0 as the highest version currently supported on Windows 98 and Me, the setup team create their own installer cache with all files contained in both the download redistributable as well as within the MSI. Cabinet streams are not stripped. This cache is found in %WINDIR%Microsoft.NETFrameworkv2.0.50727Microsoft .NET Framework 2.0. The custom action CA_AddSource.3643236F_FC70_11D3_A536_0090278A1BB8 adds this path to the source list by calling the MsiSourceListAddSource function when the product is first installed. If and when the source of a file is required it is available and you do not have to obtain the original installation source as was sometimes necessary with previous released of the .NET Framework.

Author

Heath Stewart
Principal Software Engineer

Heath is an application architect and developer, looking to help educate others to learn professional development. Besides designing and developing applications he enjoys writing about intermediate and advanced topics. Heath also consults for deployment packages and scenarios within Microsoft and for external customers.

0 comments

Discussion are closed.