3
votes

I've built an installer with WIX and have packaged it with the .NET 4.0 framework using the GenerateBootstrapper task. Now .NET 4.0 cannot be installed on XP SP2, but it appears to have no precondition check for this so its installer fails halfway through.

I'd like to add my own check to make sure the OS that the entire package is being installed on is supported by the .NET 4.0 framework. Is there a way to embed an OS/Service Pack check in the bootstrapper when you use GenerateBootstrapper? If not, how else can I accomplish this?

1
Are you certain that the .NET 4.0 Framework cannot be installed on Windows XP SP2? The bootstrapper description explicitly prohibits installation only if the service pack level is less than SP2 (Of course, official support from Microsoft for XP SP2 is no longer available, but that's a different thing). - Dirk Vollmar
Interesting. I wonder why installing .NET 4.0 is failing then. MS calls out SP3 in the framework download requirements. microsoft.com/downloads/… - roufamatic
Well, I've seen it before that a bootstrapper package definition provided by Microsoft is not doing the checks correctly. - Dirk Vollmar

1 Answers

1
votes

You could add a condition to the bootstrapper package definition file so that the bootstrapper will check for the Windows version. The description file is located at

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\
    Packages\DotNetFX40\Product.xml

on a 64-bit Windows system or at

C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\
    Packages\DotNetFX40\Product.xml

on a 32-bit Windows system. The package.xml already contains such a check, see the line

<!--  Block install on less than Windows XP SP2 --> 
<FailIf Property="VersionNT" Compare="VersionLessThan" 
        Value="5.1.2" String="InvalidPlatformWinNT" /> 

I couldn't find the relevant documentation, but it looks as if the third number of the VersionNT value is the service pack level, so probably changing the condition to check for a value of "5.1.3" will do the job.