WiX:从远程计算机安装时,安装程​​序在ConfigureUsers操作中失败

时间:2013-10-14 13:17:15

标签: powershell wix wix3.7

我有一个在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_serverbuild_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>
    

1 个答案:

答案 0 :(得分:1)

这可能是double hop issue,您的凭据无效超出第一台服务器的范围。

您可以使用以下选项执行命令:

-Authentication CredSSP

而不是Negotiate

您还需要使用-Credentials标志手动指定凭据,并为CredSSP设置客户端和服务器:

Enable-WSManCredSSP -Role Client -DelegateComputer HOSTNAME -Force
Enable-WSManCredSSP -Role Server -Force

更详细地解释了这些步骤here