windows 从 InstallShield 2009 MSI 安装 .NET 服务时出现问题 - 自定义操作未关闭 1 个 MSIHANDLE

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/381563/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 11:45:16  来源:igfitidea点击:

Problems installing .NET Services from InstallShield 2009 MSI - Custom Action did not close 1 MSIHANDLEs

.netwindowsservicewindows-installerinstallshield

提问by Andrew Harmel-Law

I am using InstallShield 2009to generate an MSIfor a codebase I have inherited. The code is comprised of VB6, and .NET 2.0code (C# and C++). I'm developing and installing on Windows XP SP2.

我正在使用InstallShield 2009为我继承的代码库生成MSI。代码由VB6.NET 2.0代码(C# 和 C++)组成。我正在Windows XP SP2上开发和安装。

I created the InstallShieldproject (call it "MyClient.ISM") by reverse engineering it from the MSIprovided by the previous team. Their configurations are the now the same.

我通过从前一个团队提供的MSI对其进行逆向工程创建了InstallShield项目(称之为"MyClient.ISM")。它们的配置现在相同。

I then configured InstallShieldto produce the MSI. This built, without error. However, when I try to run my MSIit fails with two

然后我将InstallShield配置为生成MSI。这构建,没有错误。但是,当我尝试运行我的MSI 时,它失败了两个

"Error 1001 InstallUtilLib.dll: Unknown Error"

“错误 1001 InstallUtilLib.dll:未知错误”

dialogs and then successfully backs out the changes it has made Then I ran MyClient.MSIwith the msiexec command. E.g.

对话框,然后成功退出它所做的更改然后我MyClient.MSI使用 msiexec 命令运行。例如

msiexec /lvx C:\inst_server.log /i "C:\MyClient.MSI"

It seemed that the problem was due to a 2769 error. The error locations from the log files resulting from this are below.:

问题似乎是由于2769 error. 由此产生的日志文件中的错误位置如下:

DEBUG: Error 2769: Custom Action _A11801EAD1E34CFF981127F7B95C3BE5.install 
did not close 1 MSIHANDLEs.

This Custom Action was trying to install .NET services. So I then went to InstallShieldand removed all custom actions (install, uninstall, commit and rollback as well as the associated SetProperty's) and built and installed again. This worked, but the services were no longer installed. I now need to install these .NET Services using an InstallShieldmethod which works.

此自定义操作试图安装 .NET 服务。所以我然后去InstallShield并删除所有自定义操作(安装、卸载、提交和回滚以及相关的 SetProperty)并再次构建和安装。这有效,但不再安装服务。我现在需要使用有效的InstallShield方法安装这些 .NET 服务。

回答by WeekendDiver

I see this is an older question, but thought I'd give it a go in case anyone needed help with it.

我看到这是一个较旧的问题,但我想我会试一试,以防有人需要帮助。

From what I've observed, all Error 1001's are related to the .NET Framework.

据我观察,所有错误 1001 都与 .NET Framework 相关。

First, I'd make sure you are building a setup.exe bootstrapper with your msi. Use the InstallShield Release wizard to do this, and be sure to include the version of the .NET Framework that your application needs in the bootstrapper. It could be that your test machine doesn't have the required version of the .NET Framework installed.

首先,我会确保你正在用你的 msi 构建一个 setup.exe 引导程序。使用 InstallShield Release 向导执行此操作,并确保在引导程序中包含您的应用程序所需的 .NET Framework 版本。可能是您的测试机器没有安装所需版本的 .NET Framework。

The custom action you mentioned was autogenerated by InstallShield during the build. It created wrapper custom actions to call the methods in the installer classes in your components. In your case, this was the .install method of one of your components' installer class.

您提到的自定义操作是在构建期间由 InstallShield 自动生成的。它创建了包装器自定义操作来调用组件中安装程序类中的方法。在您的情况下,这是您的组件安装程序类之一的 .install 方法。

If you've ensured that you're deploying the .NET Framework correctly, and you still have an issue, consider debugging the installer classes in the assembly. (Check here for more info: http://www.hanselman.com/blog/BackToBasicsUsingFusionLogViewerToDebugObscureLoaderErrors.aspx)

如果您已确保正确部署 .NET Framework,但仍有问题,请考虑调试程序集中的安装程序类。(在这里查看更多信息:http: //www.hanselman.com/blog/BackToBasicsUsingFusionLogViewerToDebugObscureLoaderErrors.aspx

回答by KMoraz

I had the error 1001 too, in an InstallShield 2009 basic MSI project. Try adding the automatically generated _isconfig.xml to the Support Files\Language Independent node. This will ensure the correct CLR fire up when a .NET related action such as InstallerClass invokes.

在 InstallShield 2009 基本 MSI 项目中,我也遇到了错误 1001。尝试将自动生成的 _isconfig.xml 添加到 Support Files\Language Independent 节点。这将确保在调用 InstallerClass 等 .NET 相关操作时正确启动 CLR。

In my case _isconfig.xml contents had reference to .NET 2.0 runtime, but it could refer to 1.0\1.1 as well.

就我而言,_isconfig.xml 内容引用了 .NET 2.0 运行时,但它也可以引用 1.0\1.1。

<?xml version="1.0"?>
<configuration>
    <startup>
        <supportedRuntime version="v2.0.50727"/>
    </startup>
</configuration>

See also: Q108690: INFO: Consuming A Merge Module Created Cith Microsoft Visual Studio .NET 2003 Or 2005

另请参阅:Q108690:信息:使用 Cith Microsoft Visual Studio .NET 2003 或 2005 创建的合并模块