【发布时间】:2018-11-28 11:07:31
【问题描述】:
我收到奇怪的错误:
ERROR:System.NullReferenceException: Object reference not set to an instance of an object.
at WindowsInstaller.MsiInterop.MsiInstallProduct(String product, String commandLine)
at msicontroller.Program.Main(String[] arg
声明:
[DllImport(MSI_LIB, CharSet = CharSet.Auto, SetLastError=true)]
extern static public MsiError MsiInstallProduct(string product, string commandLine);
我只在 1 台电脑上收到此错误,电脑是 win server 2016
【问题讨论】:
-
应该先阅读最后一行 - 请记住,以下建议也适用于找到 Q/A 的其他人,以防您发现它们无关紧要。 MSI 日志 和 事件查看器 说什么?它在其他服务器上工作吗?组策略设置?它是什么类型的 MSI 文件?您尝试安装的文件在哪里?可以从该服务器访问它吗?您是否尝试在服务器上手动安装?你测试了多少台机器?
标签: .net windows windows-installer pinvoke