1

我们有一个需要 SQL Server 2008 R2 Express 的 WinForms 项目。该应用程序使用 MSI 安装程序和 WIX 创建的 Bootstrapper 可执行文件进行部署。所以我们需要从我们的安装程序中运行 SQL Server 安装程序。

WIX 项目的功能很少,其中只有一个需要 SQL Server 2008 R2 Express。Bootstrapper 安装程序安装 .NET 3.5 SP1、.NET 4 和 Windows Installer 4.5,并使用 MSBuild GenerateBootstrapper 任务创建。我们使用带有嵌入式 SP1 和英文本地化的 SQL Server 2008 R2 Express,安装程序文件 SQLEXPR_x86_ENU.exe 取自http://www.microsoft.com/en-us/download/details.aspx?id=26729

当用户选择需要 SQL Server 的功能时,我们会安排一个自定义操作来运行带有参数的 SQLEXPR_x86_ENU.exe: /QS /ACTION=Install /ENU /ERRORREPORTING=0 /SQMREPORTING=0 /IACCEPTSQLSERVERLICENSETERMS /FEATURES=SQL /INSTANCENAME=ASSET_BANK /HIDECONSOLE /ADDCURRENTUSERASSQLADMIN /SAPWD=[SqlPassword] /SQLSVCACCOUNT="[WIX_ACCOUNT_LOCALSYSTEM]" /SECURITYMODE=SQL /SQLCOLLATION=Latin1_General_CI_AS 此自定义操作安排在安装程序执行序列的 InstallInitialize 操作之前。

当上述自定义操作启动时,它会在 SQL Server 安装程序的 ExecuteStandardTimingsWorkflow 操作上挂起几分钟,然后失败。当我从 CMD 运行相同的命令时,一切正常。

附上日志文件。请帮助我们解决这个问题。

Summary_ComponentUpdate.log:

Overall summary:
  Final result:                  Failed: see details below
  Exit code (Decimal):           -2068052398
  Exit facility code:            1212
  Exit error code:               1618
  Exit message:                  Failed: see details below
  Start time:                    2012-07-31 06:42:11
  End time:                      2012-07-31 06:48:58
  Requested action:              ComponentUpdate
  Log with failure:              C:\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap\Log\20120731_064129\WatsonX86_Cpu32_1_ComponentUpdate.log
  Exception help link:           http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.50.2500.0

Machine Properties:
  Machine name:                  TEST-PC
  Machine processor count:       1
  OS version:                    Windows 7
  OS service pack:               Service Pack 1
  OS region:                     United States
  OS language:                   English (United States)
  OS architecture:               x64
  Process architecture:          32 Bit
  OS clustered:                  No

Package properties:
  Description:                   SQL Server Database Services 2008 R2
  ProductName:                   SQL Server 2008 R2
  Type:                          RTM
  Version:                       10
  Installation location:         c:\935b38da99e6817b615ea738\x86\setup\
  Installation edition:          EXPRESS

  Slipstream:                    True
  SP Level                       1

User Input Settings:
  ACTION:                        ComponentUpdate
  CONFIGURATIONFILE:             
  ENU:                           True
  FARMACCOUNT:                   <empty>
  FARMADMINPORT:                 0
  FARMPASSWORD:                  *****
  HELP:                          False
  INDICATEPROGRESS:              False
  PASSPHRASE:                    *****
  PID:                           *****
  QUIET:                         False
  QUIETSIMPLE:                   True
  UIMODE:                        AutoAdvance
  X86:                           False

  Configuration file:            C:\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap\Log\20120731_064129\ConfigurationFile.ini

Detailed results:
  Feature:                       SQL
  Status:                        Skipped
  MSI status:                    Passed
  Configuration status:          Passed

Rules with failures:

Global rules:

There are no scenario-specific rules.

Rules report file:               C:\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap\Log\20120731_064129\SystemConfigurationCheck_Report.htm

WatsonX86_Cpu32_1_ComponentUpdate.log:

=== Verbose logging started: 7/31/2012  6:42:39  Build type: SHIP UNICODE 5.00.7601.00  Calling process: c:\935b38da99e6817b615ea738\x86\setup100.exe ===
MSI (c) (68:54) [06:42:39:853]: Resetting cached policy values
MSI (c) (68:54) [06:42:39:853]: Machine policy value 'Debug' is 0
MSI (c) (68:54) [06:42:39:853]: ******* RunEngine:
           ******* Product: c:\935b38da99e6817b615ea738\x86\redist\watson\dw20shared.msi
           ******* Action: 
           ******* CommandLine: **********
MSI (c) (68:54) [06:42:39:853]: Client-side and UI is none or basic: Running entire install on the server.
MSI (c) (68:54) [06:42:42:864]: Failed to grab execution mutex. System error 258.
MSI (c) (68:54) [06:42:42:864]: Cloaking enabled.
MSI (c) (68:54) [06:42:42:864]: Attempting to enable all disabled privileges before calling Install on Server
MSI (c) (68:54) [06:42:42:864]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (c) (68:54) [06:42:42:864]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (c) (68:54) [06:42:42:864]: MainEngineThread is returning 1618
=== Verbose logging stopped: 7/31/2012  6:42:42 ===
4

4 回答 4

2

您不能从另一个 .msi 安装 .msi。这就是 1618 错误所说的。

于 2012-07-31T20:55:32.430 回答
1

实际上,此问题可能是由 SQL Server 安装程序包引起的。从 SQL Server 2008 R2 开始,有一个众所周知的SQL Server 设置问题。当您在 MSI 包中启动 SQL Server 安装程序时,SQL 安装程序会尝试停止 Msiexec 进程,但父 MSI 包不允许这样做。因此 SQL Server 安装程序将挂起。正如 LucID 已经提到的,一种解决方法是使用异步自定义操作(作为单独的进程运行)启动 SQL Server 安装程序,或者创建一个 EXE 引导程序安装包,该安装包首先启动 SQL Server 安装程序,然后安装 MIS 包.

我希望这将有助于未来面临同样问题的用户。

于 2014-04-17T08:23:45.213 回答
0

实际上这是 SQL Server 2008 R2 本身的问题。我使用相同的 WIX 项目成功安装了 SQL Server 2005。看起来像 Windows Installer 4.5 和 SQL Server 的链接 msi 的问题 :(

于 2012-08-02T15:09:15.077 回答
0

我的案例:使用 WiX 创建的 msi 安装程序。SQL Server Express 2008 R2 SP1 安装程序是通过 C# 自定义操作从我的安装程序中启动的。自定义操作是从命令行启动 sql server 安装程序。它在 Windows Server 2008、Windows 7 甚至 Windows XP 中运行良好。但是,在 Windows 8 中,它给出了兼容性

我将安装程序更新为 SQL Server 2008 R2 SP2。那时它开始卡在 ExecuteStahdardTimingsWorkflow 没有任何进展。

查看 %ProgramFiles%\Microsoft SQL Server\100\Setup Bootstrap\Log 揭示了下面的内容,它给了我一个线索,即它无法超越 msiexec.exe (Windows Installer) 服务。

有什么帮助(有点残酷):在自定义操作中添加了一段代码,用于搜索 Windows Installer 服务进程 ID 并使用 taskkill /F /PID xxxxx 明确杀死它(停止没有帮助!)

2013-10-07 13:17:44 Slp: Completed Action: InitializeMsiAction, returned True
2013-10-07 13:17:44 Slp: ----------------------------------------------------------------------
2013-10-07 13:17:44 Slp: Running Action: MsiTimingAction
2013-10-07 13:17:44 Slp: ----------------------------------------------------------------------
2013-10-07 13:17:44 Slp: Running Action: Install_SqlSupport_Cpu64_Action
2013-10-07 13:17:44 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine 
2013-10-07 13:17:44 Slp: Sco: Attempting to open registry subkey 
2013-10-07 13:17:44 Slp: Sco: Attempting to open registry subkey SOFTWARE\Microsoft\VisualStudio\9.0
2013-10-07 13:17:44 Slp: Sco: Waiting for service 'msiserver' to accept the stop request.
2013-10-07 13:17:44 Slp: Sco: Returning service status Running
2013-10-07 13:17:49 Slp: Sco: Returning service status Running
2013-10-07 13:17:54 Slp: Sco: Returning service status Running
....
2013-10-07 13:20:39 Slp: Sco: Returning service status Running
2013-10-07 13:20:44 Slp: Sco: Returning service status Running
于 2013-10-07T15:39:06.030 回答