title: Wix - Custom installation directory
body: <p>I'm using Wix 3.x and the user should be able to choose the target directory. My Setup.wxs is currently like here: <a href="http://pastebin.com/uH1EjbDQ" rel="nofollow">http://pastebin.com/uH1EjbDQ</a></p>
  
  <p>What is the simplest way to ask the user for a custom target directory? (INSTALLDIR/TARGETDIR?!) I have seen example in which people build there own dialog pages but this isn't really necessary, is it?</p>
  
  <p>Update:</p>
  
  <p>When I add</p>
  
  <pre><code>&lt;Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/&gt;
  &lt;UIRef Id="WixUI_InstallDir" /&gt;
  </code></pre>
  
  <p>after <code>&lt;UIRef Id="WixUI_Mondo" /&gt;</code> but before <code>&lt;/Product&gt;</code> I get the following error:</p>
  
  <p><code>The primary key 'ExitDialog/Finish/EndDialog/Return/1' is duplicated in table 'ControlEvent'.  Please remove one of the entries or rename a part of the primary key to avoid the collision. (LGHT0130) - C:\delivery\Dev\wix30_public\src\ext\UIExtension\wixlib\WixUI_Mondo.wxs:44</code></p>
  
  <p>Now when I remove <code>&lt;UIRef Id="WixUI_Mondo" /&gt;</code> I can build the setup. But the dialog "Choose Setup Type" (Complete, Typical, Custom) is not shown anymore. And another weird thing: Sometimes a dialog pops up, stating it calculates disk space (it has a cancel button), but eventually it never closes by itself. When I close it I can still continue. Is there a way to fix this in a simple manner?</p>
  
  <p>Thanks, Philip</p>