简体   繁体   中英

WIX:default directory in WixUI_InstallDir

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>

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>

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM