I have the following example which uses two components each with a condition to select which component to run. One component uses a database linked to an SQL Authenticated User and the other to no user (Integrated Authentication).
Command line options are passed, either USEINTEGRATEDSECURITY=1 or USER=sa and PASSWORD=superadmin for either Integrated Authentication or SQL Authentication respectivly. This works fine, except it will be error prone maintaining the MSI. I am looking for a way to achieve the same result, but with out having to use two components. So just one component, but a way to instruct the database/user to which authentication type it will use. Any suggestions? Kind regards Peter Example: <Binary Id="CreateTable" SourceFile="$(var.SolutionDir)\CreateTable.sql" /> <util:User Id='SQLUser' Name='[USER]' Password='[PASSWORD]' /> <sql:SqlDatabase Id='SqlDatabase.SQLAuthentication' Database='IMAGETEST' User='SQLUser' Server='server' /> <sql:SqlDatabase Id='SqlDatabase.IntegratedAuthentication' Database='IMAGETEST' Server='server' /> <Directory Id='TARGETDIR' Name='SourceDir'> <Directory Id='ProgramFilesFolder' Name='PFiles'> <Directory Id='InstallDir' Name='Acme'> <Component Id='SqlComponent.SQLAuthentication' Guid='665D641C-3570-4b96- 9CA5-2B4C12594A35' KeyPath='yes'> <Condition><![CDATA[USEINTEGRATEDSECURITY<>1]]></Condition> <sql:SqlScript Id='CreateTable' BinaryKey='CreateTable' SqlDb='SqlDatabase.SQLAuthentication' ExecuteOnInstall='yes' /> </Component> <Component Id='SqlComponent.IntegratedAuthentication' Guid='E5DF48AE-2338-4029-9FDF-8DAA6AD0216D' KeyPath='yes'> <Condition>USEINTEGRATEDSECURITY = 1</Condition> <sql:SqlScript Id='IntegratedAuthentication.CreateTable' BinaryKey='CreateTable' SqlDb='SqlDatabase.IntegratedAuthentication' ExecuteOnInstall='yes' /> </Component> </Directory> </Directory> </Directory> <Feature Id='SqlFeature' Title='SqlFeature' Level='1'> <ComponentRef Id='SqlComponent.SQLAuthentication' /> <ComponentRef Id='SqlComponent.IntegratedAuthentication' /> </Feature> ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users