Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to target Windows Installer 3.0 with the Visual Studio 2012 compiler?

Recently Microsoft recanted their decision to drop support for Windows XP with Visual Studio 2012 Update 1. I've been told by our product manager that I can move to using the Visual Studio 2012 compiler provided:

  • We continue to support our Windows XP customers.
  • We don't introduce any additional pre-requisites beyond Windows XP SP3 (since we have a contract with some customers to that effect).

I've tried converting our solution to use the VC2012 XP tool set and all now works well from a code point of view. However, our WiX installer project complained about the fact that we were now trying to include the VC2012 Runtime Merge Modules and that these only support Windows Installer 4.5. This version of Windows Installer wasn't available in Windows XP SP3 so it would mean that our customers would have to install the Windows Installer 4.5 Redistributable package in order to be able to install our product.

Is it possible to work around this issue and still use those merge modules in a way that would support Windows Installer 3.0?

So we're currently setting:

<Package InstallerVersion="300" />

But the merge modules appear to need us to set:

<Package InstallerVersion="405" />

Which would mean we couldn't support Windows XP SP3 out of the box.

Here's the error from WiX:

warning LGHT1104: Merge module 'Microsoft_VC110_ATL' has an installer version of 405 which is greater than the product's installer version of 300. Merging a module with a higher installer version than the product it is being merged into can result in invalid values in the resulting msi. You must set the Package/@InstallerVersion attribute to 405 or greater to merge this merge module into your product.

like image 306
Benj Avatar asked Jun 11 '13 10:06

Benj


1 Answers

Install Windows Installer 4.5 with your product. It is available for Windows XP SP2 and SP3. After all, the VC 2012 runtime does not come with Windows XP either.

You might be stuck with the idea that you can only install your product as an MSI with any needed merge modules. With WiX's Bootstrapper projects (WiX 3.6 and later), you can easily create a chain of installers and bundle them into one EXE file. The engine (known as Burn) handles any needed reboots, too. If you've installed a recent version of WiX, you've seen burn in action.

If you go this route, you can also remove the merge modules from your MSI and instead all the VC 2012 runtime to your chain.

like image 171
Tom Blodget Avatar answered Sep 30 '22 12:09

Tom Blodget