CustomAction 在installshield中返回实际的错误代码1603

时间:2022-06-21 22:42:41

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

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

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

在安装和回滚操作过程中,我将得到错误1001。我在安装日志中注意到我得到了这个错误:

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

"CustomAction返回实际错误代码1603。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?

有人知道问题出在哪里吗?

4 个解决方案

#1


1  

Your installation project includes a component with .NET Installer Class set 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安装程序类设置为Yes。使用此选项是一个反模式,因为它可以导致模态UI,即使是在静默安装中,并且通常只告诉您“Error 1001”。您可以使用此设置查找组件,或者获取详细日志并在第一个或仅返回值3之前查找信息。

#2


1  

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.

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

#3


1  

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框架不匹配造成的。一种软件产品使用RegAsm。exe和InstallUtilLib。用于编译安装程序的dll文件,这些文件必须与应用程序的目标框架相匹配,目标计算机也必须有:

Error 1001 reason and solution discussed here

这里讨论的原因和解决方案

CustomAction 在installshield中返回实际的错误代码1603

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

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

#4


0  

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.

在我的例子中,我正在x64计算机上安装一个x86 windows服务。我必须在我的本地x86 .net安装文件夹中为我的可执行文件的目标框架更改两个路径。ie。

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

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

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

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

#1


1  

Your installation project includes a component with .NET Installer Class set 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安装程序类设置为Yes。使用此选项是一个反模式,因为它可以导致模态UI,即使是在静默安装中,并且通常只告诉您“Error 1001”。您可以使用此设置查找组件,或者获取详细日志并在第一个或仅返回值3之前查找信息。

#2


1  

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.

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

#3


1  

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框架不匹配造成的。一种软件产品使用RegAsm。exe和InstallUtilLib。用于编译安装程序的dll文件,这些文件必须与应用程序的目标框架相匹配,目标计算机也必须有:

Error 1001 reason and solution discussed here

这里讨论的原因和解决方案

CustomAction 在installshield中返回实际的错误代码1603

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

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

#4


0  

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.

在我的例子中,我正在x64计算机上安装一个x86 windows服务。我必须在我的本地x86 .net安装文件夹中为我的可执行文件的目标框架更改两个路径。ie。

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

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

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

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