我有一个在my_server
上运行的ASP.NET网站的WiX MSI安装程序。该软件包是通过一个非常简单的Powershell脚本install.ps1
安装的,该脚本仅使用一些参数调用msiexec
。
当我直接在install.ps1
上运行my_server
时,一切都很好。但是当我想从远程计算机(例如install.ps1
)运行my_server
build_server
时,安装失败,错误代码为1603,MSI安装日志显示以下错误:
动作开始14:22:30:ConfigureUsers。
ConfigureUsers:错误0x80070005:无法添加/删除用户操作
CustomAction ConfigureUsers返回实际的错误代码1603
有什么建议吗?
我使用以下命令远程运行install.ps1
:
Invoke-Command -ComputerName my_server -ScriptBlock { path\to\install.ps1 } -Authentication Negotiate
我在my_server
和build_server
使用相同的用户凭据。
在WiX定义中,网站设置了应用程序池的特定用户帐户,如下所示:
<Component Id="AppPoolCmp"
Guid="a-fine-looking-guid"
KeyPath="yes">
<util:User Id="AppPoolUser"
CreateUser="no"
RemoveOnUninstall="no"
Name="[APP_POOL_IDENTITY_NAME]"
Password="[APP_POOL_IDENTITY_PWD]"
Domain="[APP_POOL_IDENTITY_DOMAIN]">
</util:User>
<iis:WebAppPool Id="AppPool"
Name="[APP_POOL_NAME]"
ManagedPipelineMode="Classic"
ManagedRuntimeVersion="v4.0"
Identity="other"
User="AppPoolUser">
<iis:RecycleTime Value="5:00" />
</iis:WebAppPool>
</Component>
答案 0 :(得分:1)
这可能是double hop issue,您的凭据无效超出第一台服务器的范围。
您可以使用以下选项执行命令:
-Authentication CredSSP
而不是Negotiate
。
您还需要使用-Credentials
标志手动指定凭据,并为CredSSP设置客户端和服务器:
Enable-WSManCredSSP -Role Client -DelegateComputer HOSTNAME -Force
Enable-WSManCredSSP -Role Server -Force
更详细地解释了这些步骤here。