0

Hi I have below sample Components output of Heat.EXE. And was able to create MSI package with all the components.Basically I want filter below files based on the parameter to Installer (like Dev or Prod or UAT or TEST) during Installation.

ie msiexec -i prog.msi ENVPROPERTY="DEV" or msiexec -i prog.msi DEVPROPERTY=TRUE.

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Fragment>
        <DirectoryRef Id="INSTALLFOLDER">
            <Directory Id="dir58BD578D96681B39732F12EBF1B57BD3" Name="copyconfigfile" />
        </DirectoryRef>
    </Fragment>
    <Fragment>
        <ComponentGroup Id="Copyconfig">

 <Component Id="cmpBE90E7A6F30556F23DBCB608C0DB1CB3" Directory="dir572C565E70B3AEE6F0C29D3EE9056E9B" Guid="{912836FE-2289-405F-B65E-E0DF24E9F414}">
                <File Id="fil9FB26501E72D582B49D01D1C17297C67" KeyPath="yes" Source="C:\Workspaces\Chatra\Website\CopyConfigFile\App_Config\ConnectionStrings.DevBuild.config.xml" />
  </Component>

 <Component Id="cmp6B5A7C518B7BE0889FC54F31700D9BFE" Directory="dir572C565E70B3AEE6F0C29D3EE9056E9B" Guid="{9733D8C9-60D3-4B24-B07A-53EB5B53D69B}">
              <File Id="fil2936F4B979A59701F9D3FBAF1AED470D" KeyPath="yes" Source="C:\Workspaces\Chatra\Website\CopyConfigFile\App_Config\ConnectionStrings.ProductionBuild.config.xml" >
                <CopyFile Id="Copy_Conn" DestinationProperty="DestFilesFolder" DestinationName="ConnectionStrings.config" />
              </File>
 </Component>

 <Component Id="cmp0ECCAA5CAC3B3DD35D12C896CB3B2A5C" Directory="dir572C565E70B3AEE6F0C29D3EE9056E9B" Guid="{7A2D7A4A-FFA7-4AFC-8985-C35A19E54370}">
                <File Id="fil4B00AD7679571D03A8678128738DE0A8" KeyPath="yes" Source="C:\Workspaces\Chatra\Website\CopyConfigFile\App_Config\ConnectionStrings.TestBuild.config.xml" />
 </Component>

 <Component Id="cmp044A32CEBC53EDFFB293831A711D14D8" Directory="dir572C565E70B3AEE6F0C29D3EE9056E9B" Guid="{B79DD704-FD08-4769-8A98-FF666DB84F12}">
                <File Id="fil633E499D1A8430527DEE1A888B50CE9A" KeyPath="yes" Source="C:\Workspaces\Chatra\Website\CopyConfigFile\App_Config\ConnectionStrings.UATBuild.config.xml" />
 </Component>

  </ComponentGroup>
    </Fragment>
    <Fragment>
        <DirectoryRef Id="dir58BD578D96681B39732F12EBF1B57BD3">
            <Directory Id="dir572C565E70B3AEE6F0C29D3EE9056E9B" Name="App_Config" />
        </DirectoryRef>
    </Fragment>
</Wix>
Chat
  • 185
  • 1
  • 5
  • 15
  • try using http://wix.sourceforge.net/manual-wix2/preprocessor.htm variables – Gilad Mar 07 '13 at 21:48
  • I tried preprocessor Environment variable by creating Environment variable in system and used as below And now I am getting erros in build itself as error CNDL0150:Undefined preprocessor variable '$(env.WIXENV)' – Chat Mar 07 '13 at 21:56
  • this is the right way to use them http://wix.sourceforge.net/manual-wix3/votive_project_references.htm – Gilad Mar 07 '13 at 22:08

0 Answers0