tags:

views:

103

answers:

2

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='EFI' Name='EFI'>
               <Directory Id="dirm" Name="EFI Monarch">
                   <Component></Component>
               </Directory>
            </Directory>
          </Directory>
        </Directory>
A: 

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>
</Directory>
liggett78
A: 

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

Rob Mensching