无法通过“自定义操作"运行脚本功能 [英] Failed to run script function from Custom Actions

查看:122
本文介绍了无法通过“自定义操作"运行脚本功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实现了一个自己的installscript文件,该文件允许安装程序注册dll.我将其与自定义操作结合起来以实际运行我创建的功能.我必须制作此脚本,因为dll无法通过将属性设置为self register进行注册.因此,我坚持在自定义操作失败后如何解决此问题的方法,以便可以测试脚本. 下面是我的脚本:

I implemented an installscript file of my own that will allow the installer to register dll's. I combined this with a custom action to actually run the function I created. I had to make this script because the dlls were failing to register with setting the property to self register. So I am stuck on how to resolve this problem with the custom action failing so that I can test my script. Below is my script:

#include "Ifx.h"

export prototype RegisterComponents(HWND);

function RegisterComponents(hMSI)

STRING sRunStr;

begin

sRunStr = WINSYSDIR ^ "regsvr32.exe";

LongPathToQuote(sRunStr, TRUE);

//change the directory to target directory
ChangeDirectory(TARGETDIR);

//register dll
if(LaunchAppAndWait(sRunStr, "/s " + 
"C:\NCRUniEmulatorService\NCRUniEmulatorSO.dll", 
WAIT)) < 0) then
MessageBox("NCRUniEmulatorSO.dll", SEVERE);
else
endif;

end;

以下是我的自定义操作:

Below is my custom actions:

FunctionName:RegisterComponents

FunctionName: RegisterComponents

退货处理:同步

脚本内执行:延迟执行

安装执行顺序:在PublishProduct之后

Install Exec Sequence: After PublishProduct

所有其他序列设置都设置为不在序列中".

All other sequence settings are set to Absent from sequence.

日志文件

InstallShield 14:17:18:调用脚本函数RegisterComponents InstallShield 14:17:18:无法运行脚本功能,错误 0x80020006 InstallShield 14:17:18:CallScriptFunctionFromMsiCA()结束, 结果0x643 CustomAction RegisterComponents返回实际错误 代码1603,但由于继续标记而将转换为成功

InstallShield 14:17:18: Invoking script function RegisterComponents InstallShield 14:17:18: Failed to run script function, error 0x80020006 InstallShield 14:17:18: CallScriptFunctionFromMsiCA() ends, result 0x643 CustomAction RegisterComponents returned actual error code 1603 but will be translated to success due to continue marking

推荐答案

这是MSI项目吗? 我不会使用自我注册,而是启用有关组件的属性页中生成时的COM提取":

Is this an MSI project? I would not use self-registration, instead enable COM Extract at Build in the property page for the component in question:

如果此提取不起作用,则您可能具有不满足的依赖关系,无法加载文件.例如缺少资源dll或类似的东西. 构建时COM提取"的提取过程将填充许多特定于MSI的COM表,这些表将为您处理所有COM注册详细信息(包括回滚支持).

If this extraction does not work, then you might have dependencies that are not met for the file to load. For example a missing resource dll or something like that. The extraction process for "COM Extract at Build" will populate a number of MSI-specific COM tables that take care of all COM registration details for you (including rollback support).

InstallShield自我注册 :此外,您可以在Installshield中启用文件的自我注册,而根本不通过自定义操作代码运行.我认为它在每个文件的属性页中.

InstallShield Self-Registration: Additionally you can enable self-registration for a file in Installshield and not run via custom action code at all. I think it is in the property page for each file.

这篇关于无法通过“自定义操作"运行脚本功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆