Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to have two root directories in WIX

Tags:

wix

I need to deploy files in both C and D drives. For example File A goes to drive C and File B goes to drive D. I know that Wix allows you to have only one root directory. Is there any way I can accomplish this?

I know that one solution is to set C as the root directory in the Wix Xml and deploy files that go to C directory through the Wix Xml. The files that have to deployed to D directory then have to be deployed through a custom action.

However I want to avoid using Custom Actions and want to deploy files to both (C and D drives) using the same Wix Xml.

like image 832
coder Avatar asked Mar 11 '11 07:03

coder


1 Answers

The entire directory structure should always be wrapped into "TARGETDIR" root. But nobody limits you to define the rest of the structure under it the way you need. See the sample below:

  <Directory Id="TARGETDIR" Name="SourceDir">
     <Directory Id="INSTALLLOCATION" Name="My location">
     ...
     </Directory>
     <Directory Id="DATA_FOLDER" Name="Data">
     ...
     </Directory>
     <Directory Id="DATABASES_FOLDER">
     ...
     <Directory>
  </Directory>

Now you can set DATA_FOLDER or DATABASES_FOLDER to be on a different drive than INSTALLLOCATION. It works fine for me.

like image 89
Yan Sklyarenko Avatar answered Oct 30 '22 21:10

Yan Sklyarenko