There are two paths that can be edited by user in my installer(The directory
names are SAMPLESDIR and INSTALLDIR).
I would like to use the same Browse Dialog to allow changing both of paths.
First of all I defined new _BrowseProperty:
<Property Id="_BrowseProperty" Value="SAMPLESDIR" />
Then, I defined two custom actions to change the property value at runtime:
    <CustomAction Id="SelectInstallDir" Property="_BrowseProperty"
Value="[INSTALLDIR]" />
    <CustomAction Id="SelectSamplesDir" Property="_BrowseProperty"
Value="[SAMPLESDIR]" />
Then, in one of dialogs I defined two buttons that allow to change the
paths:
      <Control Id="ProgramFilesBrowse" Type="PushButton" X="304" Y="70"
Width="56" Height="17"
          Cancel="yes" Text="Browse...">
        <Publish Event="DoAction" Value="SelectInstallDir" />
        <Publish Event="SpawnDialog" Value="BrowseDlg">1</Publish>
      </Control>
and
      <Control Id="SamplesBrowse" Type="PushButton" X="304" Y="100"
Width="56" Height="17"
          Cancel="yes" Text="Browse...">
        <Publish Event="DoAction" Value="SelectSamplesDir" />
        <Publish Event="SpawnDialog" Value="BrowseDlg">1</Publish>
      </Control>
BrowseDlg operates with _BrowseProperty, here is the fragment:
      <Control Id="PathEdit" Type="PathEdit" Property="_BrowseProperty"
X="84" Y="202" Width="261" Height="18" Indirect="yes" />
However, BrowseDlg always shows SAMPLESDIR folder, it doesn't matter that
button was clicked - ProgramFilesBrowse or SamplesBrowse.

 
-- 
View this message in context: 
http://n2.nabble.com/Using-single-Dialog-to-change-various-paths.-tp1117476p1117476.html
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to