BrowseDialog and InstallDirDlg wix

I have InstallDirDLG and I need another browse dialog, the problem is that when I select the path in the second browse dialog, we also change the installdir path.

This is the control code:

<Control Id="IISLogDirectoryEdit" Type="PathEdit" X="45" Y="100" Width="220" Height="18" Disabled="yes" Property="IISLOGDIRECTORY" Indirect="yes" />
<Control Id="IIsLogDirectoryExplorer" Type="PushButton" X="267" Y="100" Width="56" Height="18" Text="Explorar..." />

And this is posted:

<Publish Dialog="DirectoriesDlg" Control="Next" Event="SetTargetPath" Value="[IISLOGDIRECTORY]" Order="1">1</Publish>
<Publish Dialog="DirectoriesDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="2"><![CDATA[NOT IISLOGDIRECTORY]]></Publish>
<Publish Dialog="DirectoriesDlg" Control="Next" Event="NewDialog" Value="FtpDlg" Order="3">1</Publish>
<Publish Dialog="DirectoriesDlg" Control="IIsLogDirectoryExplorer" Property="_IISBrowseProperty" Value="[IISLOGDIRECTORY]" Order="1">1</Publish>
<Publish Dialog="DirectoriesDlg" Control="IIsLogDirectoryExplorer" Event="SpawnDialog" Value="IISBrowseDlg" Order="2">1</Publish>

Thank.

+5
source share
1 answer

Use a different property name for the second browse dialog and set the property to its default value.

For instance:

    <Control Id="TestPathEdit"      Type="PathEdit"   X="120"  Y="157" Width="160" Height="18" Property="TESTPROPERTY"/>
    <Control Id="TestBrowse" Type="PushButton" X="290" Y="157" Width="56" Height="17" Text="Browse">
      <Publish Property="_BrowseProperty" Value="TESTPROPERTY" Order="1">1</Publish>
      <Publish Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>     
    </Control>

and default property value

  <Property Id="TESTPROPERTY" Value="C:\Test"/>
+8
source

All Articles