Workaround for using VS2005 SP1 version of VCRedist.EXE within a boostrapper (setup.exe)

A reader of the previous post on my blog has posted two questions about using SP1 version of VCRedist.EXE as a boostrapper package. I felt that the topic is important enough to discuss it in a dedicated post rather than comments on another post. Here are quotes of original comments:

 

I'm trying to redistribute vc_redist.exe, but the version that I can download from the web and my version install with visual studio seem to be different:

The version of vc_redist.exe downloaded from the microsoft website seems to be: 8.0.50727.42

While the version of the libraries used by VC seem to be 8.0.50727.762

Is there anywhere on the microsoft website that has the newer version?

 

SP1 version of VCRedist is installed by VS2005 SP1 update on the hard drive and it is also available as a download. The SP1 version of VCRedist.EXE is installed into the same place where RTM version was, %VSINSTALLDIR%\SDK\v2.0\BootStrapper\Packages\vcredist_*\

One may use it to redistribute SP1 versions of VC++ Libraries. 

 

VS2005 SP1 version of VCRedist.EXE is a major upgrade to RTM version of VCRedist.EXE. Before installing of SP1 version of libraries, it is going uninstall RTM version or any other earlier than SP1 version of VCRedist.EXE. Only then it is going to install new versions of VC++ libraries.

 

When it is used as part of bootstrapper (setup.exe), RTM version of VCRedist.EXE may be downloaded instead of SP1 version because of incorrect product code specified in product.xml. Here is another quote from the comment I have received:

 

As the click once deployment seems to only check for the installation on the local machine thus:

 <InstallChecks>

   <MsiProductCheck Property="VCRedistInstalled" Product="{A49F249F-0C91-497F-86DF-B2585E8E76B7}"/>

 </InstallChecks>

I noticed this post on Aaron Stebner's blog:

https://blogs.msdn.com/astebner/archive/2007/01/24/updated-vc-8-0-runtime-redistributable-packages-are-included-in-visual-studio-2005-sp1.aspx

It includes the statement:

<quote>

One additional note - the data files included with the Visual Studio deployment bootstrapper tool were not updated with the new SP1 detection mechanism. This means that if you build a setup project in VS 2005 SP1 and include the VC redist package as a prerequisite, your setup will end up downloading and installing the VC redist package on systems that already have the original VS 2005 version of this redist package installed. Because of the major upgrade functionality, this will not harm users' systems at all, but it will result in a slight time delay due to an unnecessary download and install.

</quote>

It appears that the product code has been changed to: {7299052b-02a4-4627-81f2-1818da5d550d} but the prerequisites definitions haven't for the bootstrapper. As a result, the bootstrapper code will still fail as I described above.  

 

Aaron is right that product.xml is not updated with the new product code. It contains old MSI Product code that corresponds to RTM version of VCRedist.EXE. product.xml is used in building boostrappers (setup.exe) and Clickonce deployment for detection of this version of bootstrapper package already installed on the computer. If product code is not updated, each time a bootstrapper launches install, it is going to attempt to re-install VCRedist.EXE again. To work around the issue, it is possible to change that line of product.xml with a new MSI Product code, which is {7299052b-02a4-4627-81f2-1818da5d550d} for the x86 package, {071c9b48-7c32-4621-a0ac-3f809523288f} for the x64 package or {0f8fb34e-675e-42ed-850b-29d98c2ece08} for the ia64 package. Developer support team may also help out with this issue if contacted using ways described on https://support.microsoft.com. I apologize for not catching this before SP1 was released. We are investigating why it slipped through our testing of SP1. Meanwhile for VS2005 SP1 and VS2005 hotfixes you may use the workaround or request new product.xml from the support team.