I need to create a download URL in wix burn based on the user inputs to download a MSI package. I am setting the properties as below and properties set into those variable without a problem when I give them as inputs while creating the .exe package.
<Variable Name="PROTOCOL" Value="!(wix.Protocol)" bal:Overridable="yes"/>
<Variable Name="SOURCE" Value="!(wix.Source)" bal:Overridable="yes"/>
But the problem is when I use these properties inside the downloadUrl attribute of the MsiPackage element actual values of the properties will not be taken. Burn just recognize them as [PROTOCOL] and [SOURCE]. Following is my MsiPackage element.
<MsiPackage Id="SSCE" Name="SQL Server Compact Edition" SourceFile="../PackageRepo/SQLCE 3.5/SSCERuntime-ENU.msi" Cache="no" Vital="yes" Compressed="no" ForcePerMachine="yes" Permanent="yes"
DownloadUrl="[PROTOCOL]://[SOURCE]/PackageRepo/SQLCE 3.5/SSCERuntime-ENU.msi" InstallCondition="(NOT SSCERuntimeVersion) AND (NOT SSCERuntimeServicePackLevel)"/>
Because of this file is not downloading. So can anyone please tell me how to use the property values inside the MsiPackage element's downloadUrl attribute.
The problem you face is, that those properties are not expanded at runtime (or if they where, when exactly should they be?
a little bit hacky example:
so just use the DownloadUrl for the latter relative path, and use the OnResolveSource event to set the correct downloadUrl towards the engine:
This is of course just a very hacky example but you can set the correct downloadSource with Engine.SetDownloadSource during that event.