2008/10/23 Nic Barden <[EMAIL PROTECTED]>: > Hi all, > > I have a product with 3 features - 1 being the main app (which installs > directories and files into the "Program Files\MyCompany\MyProduct" > directory), and 2 features being supporting databases, which do not add > anything to the file system. I am not sure how to stop the directories being > created within the "Program Files" folder when the main feature is NOT > selected (I am pretty sure this is extremely basic and I am overlooking > something simple!). > > Here is a snippet of the WiX file I am using: > > <Product> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory > Id="ProgramFilesFolder"> > <!-- THESE DIRECTORIES SHOULD NOT BE CREATED WHEN MAIN FEATURE IS NOT > INSTALLED! --> <Directory Id="MyCompany" Name="MyCompany"> <Directory > Id="APPLICATIONROOTDIRECTORY" Name="MyProduct" /> </Directory> > </Directory> </Directory> <Feature Id="ProductFeature" Title="My Product" > Level="1" ConfigurableDirectory="APPLICATIONROOTDIRECTORY"> <ComponentRef... > /> </Feature></Product> >
You are not overlooking anything: you define explicitely in your nested directories the MyCompany folder and its MyProduct sub-folder so they are created. Why don't you want them to be created? A feature groups components but directory aren't components. When you don't install a feature, you're not installing components but the setup create directories you defined. > The APPLICATIONROOTDIRECTORY directory is referenced in other wix libraries > from fragments. > > Thanks very much ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users