Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WIX:default directory in WixUI_InstallDir

Tags:

wix

The default directory in WixUI_InstallDir is always D:. How do i change it to directory C:?

It is also not showing my directory structure defined in .wxs file.It is only showing D:.It should actually show 'D:\folder1\folder2'. why is that ? what will i have to do to show the directory structure?

   <Property Id="ROOTDRIVE"><![CDATA[C:\]]></Property>
        <Directory Id="TARGETDIR" Name="SourceDir">
          <Directory Id="ProgramFilesFolder">
            <Directory Id='E' Name='E'>
               <Directory Id="dirm" Name="E Mrch">
                   <Component></Component>
               </Directory>
            </Directory>
          </Directory>
        </Directory>
like image 452
subs Avatar asked Jul 21 '10 04:07

subs


2 Answers

You can use the following property in the Product definition:

    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/>

INSTALLDIR can be defined like

<Directory Id="ProgramFilesFolder">
    <Directory Id="MySoftware" Name="MySoftware">
      <Directory Id="INSTALLDIR" Name="MyProduct">
      </Directory>
    </Directory>
</Directory>
like image 103
liggett78 Avatar answered Nov 15 '22 11:11

liggett78


By default, TARGETDIR (and ROOTDRIVE but nobody uses that) default to the largest drive on the machine. See ligget78's answer to address that.

like image 25
Rob Mensching Avatar answered Nov 15 '22 11:11

Rob Mensching