1
votes

I have constructed a bootstrapper bundle with WIX 3.8, in which i pass a given parameter (by DOS-window) for the installation directory to the MSI file. All works fine.

But now we want to put a second WXS file between the bootstrapper and the MSI. This one is called Source.wxs and contains the variable for the installation directory and the MsiPackage-tag (which was in the bootstrapper file before), which will start the MSI. The big question is: How can i pass my parameter from the bootstrapper to the second WXS file?

Thanks in advance! Patrick

2

2 Answers

0
votes

The question "How can i pass my parameter from the bootstrapper to the second WXS file?" displays some lack of understanding.

You see, the second WXS file is (or at least should be) part of your MSI. I assume you added that wxs file directly into the wix setup project, or into a wix library referenced by your wix setup project. Either way, your main wxs file (the one with the <wix> element) will need to pull in the fragment in the second wxs file (by referencing a component or a property etc.).

Once you pull in the contents of the second wxs, any properties defined in it will be part of the wix setup project, and any appropriately-named command line parameter supplied by the bootstrapper will be fed into the correct property, regardless of which wxs file it came from.

0
votes

If you have a variable name "App_Name" and value as Test in your wix file and wants to use in wxs file you can use as !(loc.App_Name)

example: wix file contains below variable

<String Id="App_Name" Overridable="yes">Test</String>    

your wxs can use like this

    <Product Name='!(loc.App_Name)'