title: Wix: How to add browse button in Wix
body: <p>Is there a simple way to add browse button in Wix. I created a custom by modifying from WixUI_InstallDir.wxs. This browse button is in another dialog (not the same one as for locating the installation path). This browse button will be use to specify the path to put my log files that will be created during installation.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>sorry about the confusion on "below code". I intended to show the codes initially but the space on the above reply was limited. Here I've added the codes. I manage to show the Browse dialog now but i need to be able to change the path so that it is not same as the Browse dialog path of the installation path which is _BrowseProperty. My code below is using _LogBrowseProperty but i'm not sure how do i properly define it and at where should i define it. Using the code below will generate 2819 error. Can you help to take a look on what is wrong here? Thanks a lot.</p>
  
  <p>CUSTOMDIR is defined in Product.wxs</p>
  
  <pre><code> &lt;Property Id='CUSTOMDIR' Value="TARGETDIR"&gt;&lt;/Property&gt;
  </code></pre>
  
  <p>Below is in MyWixUI_InstallDir.wxs</p>
  
  <pre><code>   &lt;Control Id="LogFolderLabel" Type="Text" X="20" Y="160" Width="290" Height="30" NoPrefix="yes"
                       Text="Folder Label" /&gt;
              &lt;Control Id="LogFolder" Type="PathEdit" X="20" Y="200" Width="320" Height="18" Property="CUSTOMDIR"
                       Indirect="yes" /&gt;
              &lt;Control Id="ChangeFolder" Type="PushButton" X="20" Y="220" Width="56" Height="17"
                       Text="Change Folder" /&gt;
  </code></pre>
  
  <p>....</p>
  
  <pre><code>  &lt;Publish Dialog="myDlg" Control="ChangeFolder" Property="_LogBrowseProperty" Value="[CUSTOMDIR]" Order="1"&gt;1&lt;/Publish&gt;
    &lt;Publish Dialog="myDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2"&gt;1&lt;/Publish&gt;
  
  
    &lt;Property Id="_LogBrowseProperty" Value="TARGETDIR" /&gt;
  </code></pre>