About Windows Installer, the .NET Framework, and Visual Studio.
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:
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.
Heath,
With regard to the reasons in 1) listed above, is there a way to force Windows installer to cache the file always?
thanks.
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.
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 http://blogs.msdn.com/heaths/archive/2005/11/29/498018.aspx. 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
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