How to add a dependent folder for a Wix burn boots

2019-02-22 03:30发布

问题:

I am new to Wix burn bootstrapper so pardon my ignorance.I have a requirement where i need to install a pre-requisite using burn bootstrapper. The prerequisite is a setup.exe(third-party) which has dependency on files and a folder(containing couple of files).All these need to exists in the root of setup.exe for the setup.exe to run successfully.

example structure--

  1. setup.exe
  2. samplefile.rsp
  3. files(this is a folder which contains files needed by setup.exe)
    1. Data1.cab
    2. Clientruntime.msi
  4. anotherfile

Here is what i got so far.

    <ExePackage Id="Ingres_Client"
                Compressed="yes"
                PerMachine="yes"
                Permanent="yes"
                Vital="yes"
                SourceFile="setup.exe"
                InstallCommand="/r sampleCR.rsp"
                InstallCondition="(VersionNT &gt; v5.1 OR VersionNT64 &gt; v5.1)"
                DetectCondition="Ingres">

    </ExePackage>

I tried to include the nesessary files using PayLoad.But i cant figure out how to add a folder('files' folder) as it is as a requirement for the setup.exe

Any help is appreciated.

回答1:

Use the Name attribute of child Payload elements.

<ExePackage SourceFile="setup.exe">
    <Payload SourceFile="samplefile.rsp" />
    <Payload SourceFile="anotherfile" />
    <Payload Name="files\data1.cab" SourceFile="files\data1.cab" />
    <Payload Name="files\clientruntime.msi" SourceFile="files\clientruntime.msi" />
</ExePackage>

If there are lots and lots of files, it's probably better to just make a self extracting zip archive.



标签: wix burn