【发布时间】:2017-06-14 15:35:59
【问题描述】:
我需要在我的 WIX 脚本上运行这个 windows 命令:
appcmd.exe set config /section:applicationPools /[name='Reviewer'].processModel.identityType:SpecificUser /[name='Reviewer'].processModel.userName:reviewer /[name='Reviewer'].processModel.password:reviewer
此命令应放在 WIX 自定义操作中(代替 MYCOMMAND,见下文)
<CustomAction Id="AssignUserToIISapp" Directory="IISFOLDER" Execute="deferred" Impersonate="no" ExeCommand="MYCOMMAND" Return="check"/>
不幸的是,我收到了一个解析错误,我需要转义单引号还是斜杠?我尝试转义单引号 \' 但我仍然收到错误:
错误 LGHT0204:ICE03:无效的格式字符串;表:CustomAction, 列:目标,键:AssignUserToIISapp
【问题讨论】:
-
你为什么不用WIX IIS扩展wixtoolset.org/documentation/manual/v3/xsd/iis/website.html
-
@ArkadySitnitsky 因为我做了许多其他类似的自定义操作,它总是有效,但我从来不需要包含斜杠或单引号,所以我很确定我必须以某种方式逃避它们