Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BrowseDialog and InstallDirDlg wix

Tags:

wix

wix3.5

I have an InstallDirDLG and i need other browse dialog, the problem is when i select the path in second browse dialog 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 the publish:

<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>

Thanks.

like image 295
camaya Avatar asked Aug 22 '11 08:08

camaya


1 Answers

Use different property name for the second browse dialog and set that property value to some default location.

For example:

<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 the default property value

<Property Id="TESTPROPERTY" Value="C:\Test"/>
like image 160
vinay Avatar answered Oct 17 '22 21:10

vinay