cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
amarold
Level 5

Installing components based on VersionNT: test for the one I want or the ones I don't

I have an installer that installs stuff to both xp & vista (and win7 pretty soon). For the pieces that are different between platforms I have a FooXP and FooVista component, and set an install condition based on the value of VersionNT. I forget exactly where I cribbed an example from, but my XP components say:
(Not VersionNT=500) And (Not VersionNT=502) And (Not VersionNT=600) And (Not VersionNT=601)

and my Vista components say:
(Not VersionNT=500) And (Not VersionNT=501) And (Not VersionNT=502) And (Not (VersionNT=600 And Not (MsiNTProductType=1))) And (Not VersionNT=601)

Looking at it today I'm wondering why I don't just test for VersionNT=501 for XP and =600 for Vista.

Which is better ? Test for the one you want, or make sure it's not all the ones you don't want ? Is there any reason why the former wouldn't work ?
Thanks
Labels (1)
0 Kudos
(1) Reply
RobertDickau
Flexera Alumni

A non-answer, but it really depends on the situation---do you want to exit on an unknown future Windows version, or assume forward compatibility? A problem with the first condition is that it misses VersionNT=400 (someone trying to install on Windows NT 4); sometimes a condition like VersionNT>600 is appropriate...
0 Kudos