[wix-users] Independent Directory element

Walter Dexter wfdexter at gmail.com
Wed Jan 17 05:07:51 PST 2018


I do sprinkle files all over the drive but it involves redefining targetdir at runtime then the root of the various drives below that. 

That's fine in my environment - my target devices are all running the same OS image and doing all the same tasks. It's not good in a more general purpose product.

If that describes your need I can try to figure out how it works. It's just boilerplate in my installers at this point.

> On Jan 17, 2018, at 5:45 AM, Dzmitry Razhanski via wix-users <wix-users at lists.wixtoolset.org> wrote:
> 
> Hello,
> 
> I think only one root directory could be and all other directories must be defined under it. 
> And it is a good practice to define all installation directories in one place. You could read about it in this example: 
> http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/add_a_file.html
> 
> But if you still want to define some directory in another fragment you could use DirectoryRef element:
> <DirectoryRef Id="TARGETDIR">
>     <Directory Id="TestDir" ... />
> </DirectoryRef>
> 
> Best regards,
>   Dzmitry Razhansky.
> 
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Ven H via wix-users
> Sent: Tuesday, January 16, 2018 7:17 PM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Cc: Ven H <venh.123 at gmail.com>
> Subject: [wix-users] Independent Directory element
> 
> Can't I define an independent Directory element inside a separate fragment or component? If I do that, I get an error saying "The directory with the Id 'TestDir' is not a valid root directory. There may only be a single root directory per product or module and it's Id attribute value must be TARGETDIR and it's Name attribute value must be SourceDir. " Sorry for asking such a silly question, but I am new to WiX, so, please forgive me. I am a newbie and a learner and could use all the help. Hence, please help.
> 
> Regards,
> Venkatesh
> 
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
> 
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list