.net CustomAction <action_name> 在 installshield 中返回实际错误代码 1603

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6929791/
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-03 15:47:32  来源:igfitidea点击:

CustomAction <action_name> returned actual error code 1603 in installshield

.netinstallshield-2011

提问by Vimal

I'm using using Basic MSI to install my application.

我正在使用 Basic MSI 来安装我的应用程序。

I'm getting Error 1001during installation and roll back action takes place. I've noticed in the installation log that I get this error:

我正在Error 1001安装和回滚操作发生。我在安装日志中注意到我收到此错误:

"CustomAction returned actual error code 1603. Action ended InstallFinalize. Return value 3.

“CustomAction 返回实际错误代码 1603。Action 结束 InstallFinalize。返回值 3。

Custom Action dll is a .NET Installer Class and the property is set to True.

自定义操作 dll 是一个 .NET 安装程序类,并且该属性设置为 True。

Does anyone have an idea what could be the problem?

有谁知道可能是什么问题?

回答by Bhalchandra K

Error code 1603 is a Windows installer's generic error code when custom action throws any error/exception. Windows installer does not show actual error/exception in installer logs. To verify actual error/exception we have to debug the custom action.

当自定义操作引发任何错误/异常时,错误代码 1603 是 Windows 安装程序的通用错误代码。Windows 安装程序不会在安装程序日志中显示实际的错误/异常。为了验证实际的错误/异常,我们必须调试自定义操作。

Please verify if custom action is throwing any error/exception.

请验证自定义操作是否引发任何错误/异常。

回答by Munawar

A verified solution:

经过验证的解决方案:

Error 1001 is due to a .Net framework mismatch. InstallShield uses RegAsm.exe and InstallUtilLib.dll to compile the installer, and these must match your application's target framework, and the target computer must also have it:

错误 1001 是由于 .Net 框架不匹配造成的。InstallShield 使用 RegAsm.exe 和 InstallUtilLib.dll 来编译安装程序,这些必须与您的应用程序的目标框架相匹配,并且目标计算机也必须具有:

Error 1001 reason and solution discussed here

此处讨论的错误 1001 原因和解决方案

enter image description here

在此处输入图片说明

Open Installshield IDE -> Go to Tools menu -> Options and check the following settings as shown in the above screenshot:

打开 Installshield IDE -> 转到工具菜单 -> 选项并检查以下设置,如上图所示:

回答by Michael Urman

Your installation project includes a component with .NET Installer Classset to Yes. Using this option is an anti-pattern, as it can result in modal UI even in silent installations, and often tells you only "Error 1001". You can either look for the component with this setting, or take a verbose log and look for information shortly before the first or only return value 3.

您的安装项目包括一个.NET Installer Class设置为Yes的组件。使用此选项是一种反模式,因为即使在静默安装中它也会导致模态 UI,并且通常只会告诉您“错误 1001”。您可以使用此设置查找组件,也可以获取详细日志并在第一个或仅返回值 3 之前不久查找信息。

回答by Kaido

In my case, I was installing an x86 windows service to an x64 machine. I had to change both paths in my options to my local x86 .net installation folder for my executable's target framework. ie.

就我而言,我正在将 x86 Windows 服务安装到 x64 机器上。我必须将选项中的两个路径更改为我的可执行文件的目标框架的本地 x86 .net 安装文件夹。IE。

32-bit location C:\Windows\Microsoft.NET\Framework\v4.0.30319

32 位位置 C:\Windows\Microsoft.NET\Framework\v4.0.30319

64-bit location C:\Windows\Microsoft.NET\Framework\v4.0.30319

64 位位置 C:\Windows\Microsoft.NET\Framework\v4.0.30319