【问题标题】:.NET-based setup project fails at installation基于 .NET 的安装项目在安装时失败
【发布时间】:2010-10-25 12:13:17
【问题描述】:

我使用Visual Studio 2008 创建了一个安装项目。在另一台机器上安装时,出现以下错误:

安装程序之前被中断 可以安装 MyApplication。你 需要重新启动安装程序才能尝试 再次。

我该如何解决这个问题?

日志文件显示如下。

MSI (s) (D8:20) [14:06:01:020]: Executing op: ComponentUnregister(ComponentId={533BAFA2-3A54-B4D7-B625-38EB0DB9BBB7},ProductKey={B10107EF-3C57-451E-9080-40FB1F4A8B95},BinaryType=0,)
MSI (s) (D8:20) [14:06:01:020]: Executing op: ComponentUnregister(ComponentId={B55DBDAF-0BCB-061A-9EA2-5AC798377ABA},ProductKey={B10107EF-3C57-451E-9080-40FB1F4A8B95},BinaryType=0,)
MSI (s) (D8:20) [14:06:01:020]: Executing op: End(Checksum=0,ProgressTotalHDWord=0,ProgressTotalLDWord=0)
MSI (s) (D8:20) [14:06:01:020]: Error in rollback skipped.  Return: 5
MSI (s) (D8:20) [14:06:01:030]: No System Restore sequence number for this installation.
MSI (s) (D8:20) [14:06:01:030]: Unlocking Server
MSI (s) (D8:20) [14:06:01:030]: PROPERTY CHANGE: Deleting UpdateStarted property. Its current value is '1'.
Action ended 14:06:01: INSTALL. Return value 3.
MSI (s) (D8:20) [14:06:01:060]: MainEngineThread is returning 1603
MSI (s) (D8:40) [14:06:01:060]: Destroying RemoteAPI object.
MSI (s) (D8:B8) [14:06:01:060]: Custom Action Manager thread ending.
MSI (c) (10:80) [14:06:01:130]: Back from server. Return value: 1603
MSI (c) (10:80) [14:06:01:140]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (c) (10:80) [14:06:01:140]: PROPERTY CHANGE: Deleting SECONDSEQUENCE property. Its current value is '1'.
Action ended 14:06:01: ExecuteAction. Return value 3.
MSI (c) (10:80) [14:06:01:150]: Doing action: FatalErrorForm
Action start 14:06:01: FatalErrorForm.
DEBUG: Error 2826:  Control Line1 on dialog FatalErrorForm extends beyond the boundaries of the dialog to the right by 3 pixels
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: FatalErrorForm, Line1, to the right
DEBUG: Error 2826:  Control Line2 on dialog FatalErrorForm extends beyond the boundaries of the dialog to the right by 3 pixels
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: FatalErrorForm, Line2, to the right
DEBUG: Error 2826:  Control BannerBmp on dialog FatalErrorForm extends beyond the boundaries of the dialog to the right by 3 pixels
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: FatalErrorForm, BannerBmp, to the right
Action ended 14:06:04: FatalErrorForm. Return value 1.
Action ended 14:06:04: INSTALL. Return value 3.
MSI (c) (10:80) [14:06:04:475]: Destroying RemoteAPI object.
MSI (c) (10:F4) [14:06:04:485]: Custom Action Manager thread ending.
=== Logging stopped: 5/12/2009  14:06:04 ===
MSI (c) (10:80) [14:06:04:495]: Note: 1: 1708 
MSI (c) (10:80) [14:06:04:505]: Product: CMS -- Installation failed.

MSI (c) (10:80) [14:06:04:515]: Grabbed execution mutex.
MSI (c) (10:80) [14:06:04:525]: Cleaning up uninstalled install packages, if any exist
MSI (c) (10:80) [14:06:04:545]: MainEngineThread is returning 1603
=== Verbose logging stopped: 5/12/2009  14:06:04 ===

`

【问题讨论】:

  • MSI 日志的问题在于,真正的错误通常在日志文件中很远 - 这意味着发布它的尾部可能无法提供关键信息。我前面提到的 Wilogutl 工具擅长将小麦从谷壳中分离出来。

标签: .net deployment windows-installer installation


【解决方案1】:
  1. 在注册表中浏览到 BFE 服务的位置 (HKLM\System\CurrentControlSet\Services\BFE\Parameters\Policy),右键单击并选择权限。
  2. 在“策略权限”窗口中,单击高级 |添加。
  3. 出现“选择用户、计算机或组”框后,将“从此位置:”更改为指向本地计算机名称。
  4. 更改搜索位置后,在“输入要选择的对象名称”框中输入“NT Service\BFE”,然后单击“检查名称” - 这将允许您添加 BFE 帐户。
  5. 为 BFE 帐户授予以下权限:

【讨论】:

    【解决方案2】:

    我们遇到了类似的问题,并在MSDN forums 找到了一个有用的提示:

    答案是安装“IIS 管理兼容性”服务器角色。

    【讨论】:

    【解决方案3】:

    尝试通过命令行安装以获取日志文件。这应该包含错误信息。

    msiexec /i program_name /lv mylogfile.log

    您可以使用Wilogutl 来更轻松地分析日志文件。

    【讨论】:

      【解决方案4】:

      Visual Studio 安装项目将为您创建两个文件:一个 MSI 文件和一个 setup.exe 引导程序。后者安装应用程序的所有先决条件,然后启动 MSI 文件。

      启动 setup.exe 引导程序时,将在 %TMP% 文件夹的子文件夹中创建一个日志文件。检查此文件中的任何错误消息。

      您也可以直接启动 MSI 文件并让它创建一个日志文件:

      msiexec /i mySetup.msi /l*vx log.txt
      

      分析日志应该可以帮助您找到问题所在。如果您需要有关错误消息的任何帮助,您可以编辑您的问题并添加错误消息。

      【讨论】:

        猜你喜欢
        • 2021-04-14
        • 2012-12-17
        • 2017-12-23
        • 1970-01-01
        • 2020-09-09
        • 2014-01-20
        • 2021-05-12
        • 2010-10-07
        • 2017-08-02
        相关资源
        最近更新 更多