Copying a directory structure using wix

So, I have a huge file structure that I want to install with the installer, I create using wix to copy to the client location. I am currently printing it as:

<Directory Id="xyz" Name = "abc FileSource = "sdfsdf">
    <Component Id="asdas" Guid="asdasd">
        <File Id = "asdfgrs" Name="name" />
    </Component>
</Directory>

As the number of files increases, I would like this to be done in an automatic way. Using heat, I can generate:

<ComponentGroup Id="weqw">
   <Component Id="2132312" Directory="Some random string (cause of concern>" Guid="asdasd">
        <File Id="sdqwdqwd> keyPath="yes" Source = "Correct source path" />
    </Component>
<ComponentGroup>

My concern is that, due to the presence of any random string in the Reference field of the heat-generated component, I will not replicate the directory structure. It's true? Is there any way around this?

+3
source share
1 answer

From the output heat /?:

-dr      directory reference to root directories (cannot contains spaces 
         e.g. -dr MyAppDirRef)

, -dr . Directory, wxs.

, - . ID XML :

  • Directory, , Id.

  • Component , , Directory.

Component Directory. , . Windows.

+3

All Articles