开发者

Wix 3.5 to create folder outside of Installation Root

开发者 https://www.devze.com 2023-03-24 15:36 出处:网络
How can i use Wix v3.5 to create folders outside of my normal installation path? Below create folder for my root installation.

How can i use Wix v3.5 to create folders outside of my normal installation path?

Below create folder for my root installation.

<Directory Id="TARGETDIR" Name="SourceDir">

  <Directory Id="INSTALLLOCATION" Name="FolderName">

  </Directory>
 </Directo开发者_StackOverflow中文版ry>

eg, if user select c:, then this will install to c:\FolderName

I need to create additional folders in C: itself. How can i achieve that?

Cheers


Nothing prevents you from having another Directory element defined side by side with INSTALLLOCATION. Make sure appropriate components then reference that folder, and you'll end up having necessary files there:

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="INSTALLLOCATION" Name="FolderName">
   ...
  </Directory>
  <Directory Id="ANOTHERLOCATION" Name="SecondFolderName">
   ...
  </Directory>
</Directory>

UPDATE: a sample with CreateFolder element is added below.

<DirectoryRef Id="ANOTHERLOCATION">
  <Component Id="comp1" Guid="GUID-HERE" KeyPath="yes">
    <CreateFolder />
  </Component>
</Directory>
0

精彩评论

暂无评论...
验证码 换一张
取 消