【发布时间】:2014-05-14 12:17:25
【问题描述】:
我们必须在多个系统上使用 InstallShield 安装我们的产品。在安装过程中,我们必须执行一些 SQL 脚本,这几乎在所有情况下都能正常工作。 除了我们拥有的日文 Windows XP(x86 和 SP3)。 (它不会在每台机器上都失败,只是在一些机器上)。
首先,即使安装正在运行并且没有错误输出结束,由于缺少数据库和 SQL 实例设置,应用程序也没有运行。 在MSI我第一次发现没问题。
我发现注册表项扩展了日志文件,因此我能够在一个地方看到错误。 安装程序无法从安装程序临时文件中提取 SQL 脚本。
这是工作安装的样子:
MSI (s) (D0:CC) [06:32:27:394]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI2B17.tmp, Entrypoint: ISSQLServerCosting
1: Beginning SQL Server Costing Process...
1: Reading the SQL script data from ISSQLConnection table...
1: ISSQLRequirement table does not exist...
1: ISSQLRequirement table does not exist...
1: Finished SQL Server Costing Process...
1: Setting Costing Info Location ISSQLServerInstall : C:\Users\UserName\AppData\Local\Temp\~2B44.tmp
MSI (s) (D0!9C) [06:32:27:465]: PROPERTY CHANGE: Adding ISSQLServerInstall property. Its value is 'C:\Users\UserName\AppData\Local\Temp\~2B44.tmp'.
...
(还有一些带有“属性更改:添加”的“设置成本计算信息位置”行。)
但在不工作的日文 XP 上,它看起来像:
MSI (s) (8C:E0) [14:51:37:031]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI30.tmp, Entrypoint: ISSQLServerCosting
1: Beginning SQL Server Costing Process...
1: Reading the SQL script data from ISSQLConnection table...
1: ISSQLRequirement table does not exist...
1: An unhandled exception occurred in ExtractScriptFile()
1: An unhandled exception occurred in ExtractScriptFile()
1: An unhandled exception occurred in ExtractScriptFile()
1: An unhandled exception occurred in ExtractScriptFile()
1: ISSQLRequirement table does not exist...
1: An unhandled exception occurred in ExtractScriptFile()
1: Finished SQL Server Costing Process...
1: Setting Costing Info Location ISSQLServerInstall :
1: Setting Costing Info Location ISSQLServerUninstall :
我们看到未处理的异常,并且操作没有结果。
- 在 MS 帮助页面中,我看到“未处理的异常”,这可能是由 netapi32.dll 中的错误引起的,因此我尝试将其替换为另一个版本。这并没有改变任何东西,而且在安装过程中,新版本无论如何都会被原来的版本取代。
- 在安装过程中会有相同数量的临时文件(以 %temp% 为单位),这些文件也会在工作系统上创建。
- 在日文版 Windows XP 的虚拟机上运行正常,我发现没有区别。
- 所有工作都找到并且没有错误,只是缺少的 SQL 脚本发生在该系统上。安装本身不会以错误结束。
我没有想法:-/请帮助
【问题讨论】:
-
这是一个 InstallScript 自定义操作吗? InstallShield 脚本引擎的 COM/DCOM 支持在历史上很脆弱,这就是我现在所能建议的全部。根据 API 名称,无法让脚本从 MSI 中运行。
-
不,它不是自定义的。 SQL 脚本及其设置在此 SQL 部分的 InstallShield 中进行配置。到目前为止,我看到的唯一想法是 msi.dll 在它不起作用的机器上是 4.5.6001.22299。在工作机器上是 4.5.6001.22159。
标签: sql windows-xp windows-installer installshield