Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从浏览对话框使用WiX属性_Wix_Wix3.5 - Fatal编程技术网

从浏览对话框使用WiX属性

从浏览对话框使用WiX属性,wix,wix3.5,Wix,Wix3.5,我正在使用开发一个安装项目,我有以下问题。我使用浏览对话框从用户那里获得一个目录路径,我需要将该路径放入web.config。问题在于,在web.config中,将值放入WWWMain,而不是用户选择的路径 这是我的代码: Product.wxs Dialog.wxs 安装程序.wxs 在Dialog.wxs中声明变量,但在控件之后 范例 <Control Id="DiffBackUpEdit" Type="PathEdit" X="120" Y="157" Width="160" He

我正在使用开发一个安装项目,我有以下问题。我使用浏览对话框从用户那里获得一个目录路径,我需要将该路径放入web.config。问题在于,在web.config中,将值放入WWWMain,而不是用户选择的路径

这是我的代码:

Product.wxs

Dialog.wxs

安装程序.wxs


在Dialog.wxs中声明变量,但在控件之后

范例

<Control Id="DiffBackUpEdit" Type="PathEdit" X="120"  Y="157" Width="160" Height="18" Property="IISLOGDIRECTORY">
</Control>
<Control Id="Browse12" Type="PushButton" X="290" Y="157" Width="56" Height="17" Text="Browse">
    <Publish Property="_BrowseProperty" Value="DIFFDBBACKUPLOC" Order="1">1</Publish>
    <Publish Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
</Control>
然后在底部同一页后添加

<Property Id="IISLOGDIRECTORY" Value="C:\Database\MDM"/>

该问题是概念性的,因此路径将正确保存在web.config中,因为必须将值放入[WWWMain]
<util:XmlFile Id="ModifyIISLogDirectory"
           Action="setValue"
           Permanent="yes"
           ElementPath="/configuration/appSettings/add[\[]@key='isslogdirectory'[\]]/@value"
           File="[INSTALLLOCATION]Web\Web.config"
           Value="[IISLOGDIRECTORY]"/>
<Control Id="DiffBackUpEdit" Type="PathEdit" X="120"  Y="157" Width="160" Height="18" Property="IISLOGDIRECTORY">
</Control>
<Control Id="Browse12" Type="PushButton" X="290" Y="157" Width="56" Height="17" Text="Browse">
    <Publish Property="_BrowseProperty" Value="DIFFDBBACKUPLOC" Order="1">1</Publish>
    <Publish Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
</Control>
<Property Id="IISLOGDIRECTORY" Value="C:\Database\MDM"/>