Here's what I ended up with.

      <Component Id="File2000.ext" 
Guid="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" Transitive="yes">
        <Condition> NOT VersionNT=500 </Condition>
        <File Id="File2000.ext" Name="File.ext" Source="files\File2000.ext" 
KeyPath="yes" />
      </Component>

      <Component Id="FileXP.ext" Guid="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" 
Transitive="yes">
        <Condition> NOT VersionNT=501 </Condition>
        <File Id="FileXP.ext" Name="File.ext" Source="files\FileXP.ext" 
KeyPath="yes" />
      </Component>

      <Component Id="FileVista.ext" 
Guid="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" Transitive="yes">
        <Condition> NOT VersionNT=600 </Condition>
        <File Id="FileVista.ext" Name="File.ext" Source="files\FileVista.ext" 
KeyPath="yes" />
      </Component>

      <Feature Id="ProductFeature" Title="Main" Level="1">
        <ComponentRef Id="File2000.ext"/>
        <ComponentRef Id="FileXP.ext"/>
        <ComponentRef Id="FileVista.ext"/>
      </Feature>

It builds successfully with three LGHT1076 warnings which are expected.

Thanks,
Mike

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rob Mensching
Sent: Saturday, August 16, 2008 12:40 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Installing different version of file depending on OS

You might consider putting the conditions in the Component and marking the 
Component/@Transitive="yes" so that the right file gets repaired if the user 
upgrades their OS.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Schuett, Michael
Sent: Friday, August 15, 2008 16:19
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Installing different version of file depending on OS

Hello,

I need to install a different version of a file depending on the OS. The 
installed file needs to have the same name.

Here's my code that works if the <File Name= are unique.

      <Component Id="File2000.ext" 
Guid="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}">
         <File Id="File2000.ext" Name="File.ext" Source="files\File2000.ext" 
KeyPath="yes" />
      </Component>

      <Component Id="FileXP.ext" Guid="{{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}">
         <File Id="FileXP.ext" Name="File.ext" Source="files\FileXP.ext" 
KeyPath="yes" />
      </Component>

      <Component Id="FileVista.ext" 
Guid="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}">
         <File Id="FileVista.ext" Name="File.ext" Source="files\FileVista.ext" 
KeyPath="yes" />
      </Component>

      <Feature Id="File2000.ext" Level="1">
        <Condition Level="0"> VersionNT=500 </Condition>
        <ComponentRef Id="File2000.ext"/>
      </Feature>

      <Feature Id="FileXP.ext" Level="1">
        <Condition Level="0"> VersionNT=501 </Condition>
        <ComponentRef Id="FileXP.ext"/>
      </Feature>

      <Feature Id="FileVista.ext" Level="1">
        <Condition Level="0"> VersionNT=600 </Condition>
        <ComponentRef Id="FileVista.ext"/>
      </Feature>

Thanks,
Mike

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge 
Build the coolest Linux based applications with Moblin SDK & win great prizes 
Grand prize is a trip for two to an Open Source event anywhere in the world 
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge 
Build the coolest Linux based applications with Moblin SDK & win great prizes 
Grand prize is a trip for two to an Open Source event anywhere in the world 
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to