0
我正在使用WiX开发安装项目,并且遇到以下问题。我从使用浏览对话框的用户那里得到一个目录路径,我需要把这个路径放在web.config
。问题在于web.config
将值放在“WWWMain”中,而不是用户选择的路径。从浏览对话框中使用WiX属性
这是我的代码:
Product.wxs
<Property Id="IISLOGDIRECTORY" Value="WWWMain" />
Dialog.wxs
<Control Id="IISLogDirectoryEdit" Type="PathEdit" X="45" Y="100" Width="220" Height="18" Disabled="yes" Property="IISLOGDIRECTORY" Indirect="yes" />
Installation.wxs
<util:XmlFile Id="ModifyIISLogDirectory"
Action="setValue"
Permanent="yes"
ElementPath="/configuration/appSettings/add[\[]@key='isslogdirectory'[\]]/@value"
File="[INSTALLLOCATION]Web\Web.config"
Value="[IISLOGDIRECTORY]"/>
问题是概念上的,从而使该路径将被正确保存在web.config中,因为该值必须放在[WWWMain] – camaya