Reputation:
I'm very new to the WiX toolset. I have to create an installer with 2 requirements:
The actual thing that i want to know. 2. User can choose a path. may someone help how to do that setup or program install at user defined path.
This is the code i have used for default path.
<Directory Id="TARGETDIR" Name="SourceDir" />
<Directory Id="DesktopFolder" Name="Desktop"/>
<Directory Id="ProgramFilesFolder" />
<Directory Id="INSTALLDIR" Name="Test" />
<Directory Id="dirTest" Name="dirTest">
<Directory Id="ID" Name="Project Name" />
<Directory Id="A_ID" Name="NAME" />
<Directory Id="Queries" Name="Queries" />
<Directory Id="v1311" Name="1.3.1.1"/>
Upvotes: 3
Views: 59
Reputation: 81473
It's easily found in the documentation
WixUI_InstallDir does not allow the user to choose what features to install, but it adds a dialog to let the user choose a directory where the product will be installed.
This dialog set is defined in the file WixUI_InstallDir.wxs in the WixUIExtension in the WiX source code.
Using WixUI_InstallDir
To use WixUI_InstallDir, you must set a property named WIXUI_INSTALLDIR with a value of the ID of the directory you want the user to be able to specify the location of. The directory ID must be all uppercase characters because it must be passed from the UI to the execute sequence to take effect.
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="TESTFILEPRODUCTDIR" Name="Test File">
...
</Directory>
</Directory>
</Directory>
...
<Property Id="WIXUI_INSTALLDIR" Value="TESTFILEPRODUCTDIR" />
<UIRef Id="WixUI_InstallDir" />
Upvotes: 2