我有一个InstallDirDLG,我需要其他浏览对话框,问题是当我在第二个浏览对话框中选择路径时也更改了installdir路径。
这是控制代码:
<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..." />
这是发布:
<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>
谢谢。
最佳答案
在第二个浏览对话框中使用不同的属性名称,并将该属性值设置为某个默认位置
例如:
<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>
和默认属性值
<Property Id="TESTPROPERTY" Value="C:\Test"/>
关于wix - BrowseDialog和InstallDirDlg wix,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7144831/