【问题标题】:Two almost identical WIX projects - one works fine, the other fails with security issue两个几乎相同的 WIX 项目 - 一个工作正常,另一个因安全问题而失败
【发布时间】:2010-08-27 02:19:57
【问题描述】:

我有两个 Windows 服务的 WIX 安装程序。两者都使用相同的凭据安装,但一个工作,而另一个失败,错误“Service”PCP Event Processor-3.9.9.0-wix' (MyServiceExeName) could not be installed.验证您是否有足够的权限来安装系统服务。"。我为两个项目使用了一个通用的 wxi 文件以及要使用的凭据,因此它不是 AFAICS 的帐户名或域名拼写错误。两者之间唯一的实质性区别正在安装的两个服务是:

  • 失败的项目有一个用于第 3 方组件的 .licx 文件。
  • 失败的项目是 WinExe 项目。成功安装的是一个 Exe(控制台风格的应用)

据我所知,两个安装程序的 wxs 文件之间没有真正的区别(显然 GUID 不同)。失败的组件具有这样的 WIX 安装程序代码:

<Component Id="cmpMainExe" Guid="{EXCISED-FOR-CUT-N-PASTERS}">
  <File Id="filASJHDJSDJSHGDJH" Source="$(var.EventPollingService.TargetDir)\EventPollingService.exe" />
  <ServiceInstall Name="$(var.SVCNAME)-$(var.ProductVersion)-$(var.BranchName)"
                  DisplayName="PCP $(var.SVCNAME)-$(var.ProductVersion)-$(var.BranchName)"
                  Type="ownProcess"
                  Interactive="no"
                  Start="auto"
                  Vital="yes"
                  ErrorControl="normal"
                  Description="Manages the state model of a user's session by handling incoming events from the dialler"
                  Account="$(var.ServiceAccountId)" 
                  Password="$(var.ServiceAccountPwd)" />
  <ServiceControl Id="StartWixServiceInstaller"
                  Name="$(var.SVCNAME)-$(var.ProductVersion)-$(var.BranchName)"
                  Start="install"
                  Wait="yes" />
  <ServiceControl Id="StopWixServiceInstaller"
                  Name="$(var.SVCNAME)-$(var.ProductVersion)-$(var.BranchName)"
                  Stop="both" Wait="yes"
                  Remove="uninstall" />
</Component>

我在 VS 2010 中使用带有 Votive 的 Wix 3.5,这两个项目都是 .NET 3.5 SP1 应用程序。我使用的是 Windows 7,UAC 已关闭。

有什么想法吗?

【问题讨论】:

    标签: security windows-services wix wix3.5 votive


    【解决方案1】:

    查看ORCA from Windows SDK 中的两个构建 MSI,并验证 ServiceInstall 表条目是否相同。

    但是,根据我的经验,这不太可能是安装程序问题。这通常是一条红鲱鱼,指出应用程序问题,例如缺少依赖项或应用程序异常。在您排除 ServiceInstall 条目并验证服务帐户凭据是否正确后,该帐户未被禁用并且该帐户有权作为服务登录,然后开始分析您的应用程序。当安装程序挂在错误窗口时,这是最容易做到的。

    最后的两个想法:

    如果程序依赖于 winsxs 或 GAC,它将无法工作,因为在尝试启动服务之后的 Commit 执行之前不会安装它们

    如果您需要授予用户 LogonAsService 权限,请查看 WiX 中的 User 元素。

    【讨论】:

    • 我已经添加了一个指向 ORCA 的链接,因为第一次查找时不太容易找到它
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-02
    • 2020-06-26
    • 1970-01-01
    • 1970-01-01
    • 2011-02-11
    • 1970-01-01
    相关资源
    最近更新 更多