I'm trying to have my installer copy one of two different files depending on the screen resolution of the install host by testing the ScreenX property in a condition element. However, using the code below the statement <Condition>ScreenX="1024"</Condition> ALWAYS evaluates as true, regardless of the actual resolution of the host. <Condition>ScreenX="800"</Condition> NEVER evaluates as true even on a host whose screen is actually 800x600
If you uncomment the bits of code below pertaining to "scrnxtest", rebuild and run the installer, and then run "echo %SCRNXVAL%" in a terminal you will find that the value of ScreenX at the point at which that code executes is ALWAYS 1024! Can anyone explain why this is happening? It seemed like such a dead-simple task, but I've now lost a couple of hours of my life trying to make this work without success. Any insight would be much appreciated Andy <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="*" Name="screenXtest" Language="1033" Version="1.0.0.0" Manufacturer="myCompany" UpgradeCode="3cb0dd14-7e9a-40b0-a81b-53797e41748c"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /> <Feature Id="ProductFeature" Title="screenXtest" Level="1"> <ComponentGroupRef Id="ProductComponents" /> <!--<ComponentRef Id="scrnxtest" />--> <ComponentRef Id="file_800" /> <ComponentRef Id="file_1024" /> </Feature> </Product> <Fragment> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLFOLDER" Name="screenXtest" /> </Directory> </Directory> </Fragment> <Fragment> <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> <!--<Component Id="scrnxtest" Guid="6BEE1B0D-2042-4AE0-9CF8-613533669A59"> <Environment Id="TestMinVar" Action="set" Part="all" Name="SCRNXVAL" Value="[ScreenX]" /> <CreateFolder/> </Component>--> <Component Id="file_800" Guid="46BA4860-FAD3-4604-BDFE-4917A3B109CF"> <Condition>ScreenX="800"</Condition> <File Id="file_800" Source="file_800.dat"></File> </Component> <Component Id="file_1024" Guid="0F7A85B7-B33D-4947-9753-5616386ED2BD"> <Condition>ScreenX="1024"</Condition> <File Id="file_1024" Source="file_1024.dat"></File> </Component> </ComponentGroup> </Fragment> </Wix> ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users