Reputation: 1561
Any help will be much appreciated.
I'm writing this WIX installer to get an MSI to install a web app on our servers.
Within my app, I have this PROPERTY - "WEBDIR". I use this property later in my code as a Directory Id.
I set this property in 3 ways.
(Method 'A') As a property passed when you call msiexec in quiet mode. [Setting it here as C:\Path1] Like so:
msiexec /quiet /i My.msi WEBDIR="C:\Path1" /l*v InstallationLog.log
(Method 'B') From an IniFileSearch. I have an ini file in C:\Windows called MySetup.ini where the key WebsitesDir resolves the value C:\Path2. [Setting it here as C:\Path2]:
<Property Id="WEBDIR">
<IniFileSearch Id="WebsitesDirIni" Name="MySetup.ini" Section="InstallLocations" Key="WebsitesDir" Type="raw"/>
</Property>
(Method 'C') Using a default directory structure. [Setting it here as C:\Path3] As follows:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WEBDIR" Name="Path3">
</Directory>
</Directory>
The way it currently works is as follows: - When Methods 'A', 'B' and 'C' all set the property value, B takes precedence. - When only Methods 'A' and 'C' set the property value, 'C' takes precedence.
What I want is to be able to set the order of precedence to 'A'. If !'A' then 'B' else 'C'.
Is this possible?
Upvotes: 4
Views: 2174
Reputation: 21426
No, this is not possible. If you want to control the order the best approach would be an immediate custom action. Since it needs to set an installer property, your custom action must receive the installation handle (a win32 DLL is recommended).
Under normal circumstances the installer will use this order:
Upvotes: 1