0

我必须修复的产品的旧 msi 适用于 Windows Server 2003 Standard 的 180 天试用版,但在完全许可的版本中失败。msi 是用 wix2 构建的(http://schemas.microsoft.com/wix/2003/01/wi但不再存在)

当它在许可服务器上失败时,日志报告

CustomActionException: System.NullReferenceException

来自 CustomAction 函数,该函数从注册表中查找 SSRS 服务器路径和原始 SQL 服务器实例名称。

查看 MSI 自定义操作代码,我验证了 MSI 所需的注册表设置和服务器路径确实存在正确的数据。

传递给自定义操作函数的参数中的“会话”是否可能为空?

[CustomAction]
public static ActionResult FindSSRSPath (Session session)
{
    View ComboBoxView = session.Database.OpenView("select * from ListBox");
    View AvailableInstacesView = session.Database.OpenView("select * from AvailableInstances");
    ... etc

会话成员的使用是我在运行 msi 时无法验证的唯一部分代码。

session 怎么可能是空的?反正有没有检查,或防止?

为什么这会在 180 天试用版中起作用,而不是在服务器的许可版本中起作用?(我知道这是一个范围......)

4

1 回答 1

0

The MSI only works in the x86 version of the server, and not in x64. The msi didn't warn of this. Be wary of old MSI's that don't warn.

于 2018-02-27T20:35:11.960 回答