views:

1118

answers:

1

I've demanded .NET 3.5 SP1 a la http://stackoverflow.com/questions/88136/will-a-vs2008-setup-project-update-net-3-5-sp1. This makes the setup.exe check correctly.

I've also added a "SP1" launch condition to my MSI so it doesn't let the user install my .NET 3.5SP1 app via launching the MSI (and replaced the [VSDNETMSG] in the Framework condition message with one that actually mentions SP1).

From a future proofing point of view, this feels wrong. I want the condition to be:

(NETVer=3.5 AND Net35SPLevel=1) OR (NETVer=>3.5)

not

(NETVer=3.5 AND Net35SPLevel=1)

Is there any way to do that? The framework check doesnt have a condition property to allow me to add a sub-condition...

Yes, I could also just not worry my pretty little head about it :P

If one of the MS versioning experts out there reads this, if you're going to put stuff that code depends on into SPs, can you please make the installer be able to check for it OOTB.

(I really wish they had come up with a better numbering scheme - the world and its dog could see that this was going to get confusing)

A: 

Ah, as all but pointed in the article linked to from the other post I referenced, you could use the fact that a registry search that fails will yield a blank string (whereas #0 and #1 will result if 3.5 is actually installed and use the expression:

(NET35SPLEVEL="") OR NOT (NET35SPLEVEL>>"0")

This makes the check a disjunction, not a conjunction[1]

Which solves the problem - the check wont fail on 4.0 with no SP.

The remaining issue is that still doesnt cover the case where 4/4.1/4/5/5/6 is installed and there is an unservicepacked 3.5 on the machine... (So unaccepting my response!)

[1] Aint that right, Adam!

Ruben Bartelink