Is there a way to ensure, either through specifying order or by specifying dependencies, that one component will execute before another in WiX?
Specifically, I'm trying to create a database, then, optionally, run a script on it. My Wix looks similar to this:
<ComponentGroup Id="SQLServerComponentGroup">
<Component Id="SQLServerIstallScriptWA" Guid="" >
<Condition>INSTALLDB</Condition>
<mssql:SqlDatabase Id="dbWA" Server="localhost" Database="[DATABASENAME]" CreateOnInstall="yes" ConfirmOverwrite="yes" DropOnReinstall="no" DropOnUninstall="yes">
<mssql:SqlScript Id="dbWAScript" ContinueOnError="no" ExecuteOnInstall="yes" ExecuteOnReinstall="no" Sequence="1" BinaryKey="MSSQLCreateDBBin" />
</mssql:SqlDatabase>
</Component>
<Component Id="SQLServerCreateUserWA" Guid="">
<Condition>INSTALLDB AND DBCREATEUSER = 1</Condition>
<mssql:SqlDatabase Id="dbWA" Server="localhost" Database="[DATABASENAME]">
<mssql:SqlString Id="dbWACreateUser" ContinueOnError="no" ExecuteOnInstall="yes" ExecuteOnReinstall="no" ExecuteOnUninstall="no" Sequence="1" SQL="" />
</mssql:SqlDatabase>
</Component>
</ComponentGroup>
I want to ensure that the SQLServerInstallScriptWA component is executed before SQLServerCreateUserWA component.