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
By default, TARGETDIR (and ROOTDRIVE but nobody uses that) default to the largest drive on the machine. See ligget78's answer to address that.
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>