Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

Possible issues with the Visual Studio 2008 bootstrapper and how to work around them

Possible issues with the Visual Studio 2008 bootstrapper and how to work around them

  • Comments 0

A while back, I posted a set of steps that you can use to create an MSI with WiX and combine it with a Visual Studio setup.exe bootstrapper to create an installer that can chain prerequisites and then install the MSI.  Since then, I've gotten a couple of questions about odd behaviors that customers have observed in the Visual Studio bootstrapper, and I've learned about a couple of issues about that bootstrapper technology and how to work around them that I wanted to describe here.

Issue 1 - problem creating a self-extracting package with the Visual Studio 2008 bootstrapper

If you use Visual Studio 2008 to create a VS bootstrapper package, you will notice that the setup.exe process exits as soon as it launches the install process for your MSI.  That typically causes problems if the setup.exe is embedded in a self-extracting package.  Because setup.exe exits before the overall installation process is complete, the self-extracting package will try to clean up and exit, and that can end up deleting files that are needed by the MSI that is still in the process of installing.

This behavior is new in bootstrapper packages created with Visual Studio 2008, and the change is designed to allow the bootstrapper to work better with UAC on Windows Vista.  There are a couple of options available to you to work around this issue if needed:

  • Write a small stub program that will call the VS bootstrapper setup.exe package, and that knows how to monitor the status of the setup.exe process and the msiexec.exe process that will be used to install your MSI.  That stub can wait for both processes, and then exits only after both are done.  This will allow the self-extracting package to clean up only when all installation actions are done.
  • Use Visual Studio 2005 to create your setup.exe bootstrapper instead of Visual Studio 2008.

Issue 2 - problem displaying download progress for the MSI via the Visual Studio 2008 bootstrapper

If you use Visual Studio 2008 to create a VS bootstrapper package, and you configure the bootstrapper to download your MSI from the Internet (by using the HomeSite value for the ComponentsLocation attribute in the GenerateBootstrapper task), you may not see any progress UI while the MSI is being downloaded.  This is a bug in the VS 2008 bootstrapper that is fixed in VS 2008 SP1.  To fix this, you can install VS 2008 SP1 and rebuild your setup.exe bootstrapper.

When you rebuild setup.exe, make sure that you use the version of msbuild.exe that is in the .NET Framework 3.5 directory (%windir%\Microsoft.NET\Framework\v3.5\msbuild.exe) and not the copy of msbuild.exe in the .NET Framework 2.0 directory (%windir%\Microsoft.NET\Framework\v2.0.50727\msbuild.exe) or else you will not see the download progress for your MSI, even if you have VS 2008 SP1 installed.

Leave a Comment
  • Please add 3 and 4 and type the answer here:
  • Post