【发布时间】:2020-01-11 05:27:45
【问题描述】:
我正在拼命尝试使用 Inno Installer 安装 SQL Server Express 2017。 在我的安装程序中,我包含了提取的安装程序文件。 这意味着我已经执行了常见的 SQLEXPR_x64_ENU.exe,以避免在我的安装程序运行时出现“extract-temp-folder”提示。
我在cmd上执行如下:
{somePath}\SQLEXPR_x64_ENU\setup.exe /ACTION=Install /Q /SKIPRULES=RebootRequiredCheck /SUPPRESSPRIVACYSTATEMENTNOTICE=1 /IAcceptSQLServerLicenseTerms=1 /SECURITYMODE=SQL /SAPWD=secretPW /ConfigurationFile=ConfigurationFileExpr.ini
安装成功。
但是当我像这样在 InnoInstaller-File 中执行相同操作时:
...
[Files]
Source: "SQLEXPR_x64_ENU\*"; DestDir: "{tmp}\SQLEXPR_x64_ENU"; Check: not SQLExpress_Check; Flags: recursesubdirs;
[Run]
Filename: "{tmp}\SQLEXPR_x64_ENU\setup.exe"; Description: "Installing SQL Server Express 2017..."; StatusMsg: "Installing SQL Server Express 2017..."; \
Parameters: "/ACTION=Install /Q /SKIPRULES=RebootRequiredCheck /SUPPRESSPRIVACYSTATEMENTNOTICE=1 /IAcceptSQLServerLicenseTerms=1 /SECURITYMODE=SQL /SAPWD=secretPW /ConfigurationFile=ConfigurationFileExpr.ini"; Check: not SQLExpress_Check; Flags: runascurrentuser;
...
SQL 安装程序失败并出现以下错误:
Exception type: System.MissingMethodException
Message:
Method not found: 'Void Microsoft.SqlServer.Chainer.Infrastructure.RoleService.Initialize(Microsoft.SQL.Chainer.Product.RolesType)'.
HResult : 0x80131513
Data:
DisableWatson = true
Stack:
at Microsoft.SqlServer.Configuration.BootstrapExtension.InitializeRoleServiceAction.ExecuteAction(String actionId)
at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.<>c__DisplayClasse.<ExecuteActionWithRetryHelper>b__b()
at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate)
这是权限错误吗? 我没有头绪。 在 cmd-shell 上有效,但在 InnoInstaller 上无效。
提前感谢您的努力,祝您有美好的一天。
【问题讨论】:
-
似乎这可能是之前安装损坏的结果:social.technet.microsoft.com/Forums/SqlServer/en-US/…
-
如果你在别处“安装”
setup.exe(不是{tmp}),它会改变什么吗?如果仍然失败,那么当您手动执行“已安装”setup.exe(来自elsewhere)时,它是否至少可以工作? -
@PaulColdrey:我会检查一下,但我在“干净”的 WIn10 虚拟机上运行它。
-
@MartinPrikryl:不,它不会改变任何东西。我还将它复制到我当前的安装程序应用程序路径。但是,当我在安装程序失败后使用 cmd 命令从应用程序路径执行安装程序时,它可以工作。
标签: inno-setup sql-server-express