vbscript - 当我的 InstallShield 安装程序尝试运行我的 VBS 自定义操作时

自定义操作配置如下:

Custom Action Name: MyCustomAction

VBScript Filename: <PathVar01>\MyFolder\MyVBSfile.vbs

ScriptFunction: MyFunction

Return Processing: Synchronous (Check exit code)

In-Script Execution: Immediate Execution

它通过以下 InstallScript 代码执行:

result = MsiDoAction(ISMSI_HANDLE,"MyCustomAction");

当安装程序到达 InstallScript 中的那一行时,安装程​​序会显示错误警报,说明:

"Error 1720.There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor."

MsiDoAction返回的结果码是'1603',according to winerror.h , 是:

//
// MessageId: ERROR_INSTALL_FAILURE
//
// MessageText:
//
//  Fatal error during installation.
//
#define ERROR_INSTALL_FAILURE            1603L

为什么会这样?我开始怀疑该文件是否包含正确。然而,我指向了正确的文件,并且我尝试通过 InstallShield 支持文件包含 VBS,认为这将确保该文件存在于安装程序中,但结果相同。

最佳答案

在启用日志记录的情况下运行设置揭示了问题:

Action 13:29:19: MyCustomAction.
Action start 13:29:19: MyCustomAction.

Error 1720.There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action MyCustomAction script error -2146827278, Microsoft VBScript compilation error: Expected identifier Line 163, Column 37,
blnExample,)

在启用日志记录的情况下运行设置:

"C:\SetupFolder\setup.exe" /V"/l*v c:\Install.log"

This forum thread很有帮助。

关于vbscript - 当我的 InstallShield 安装程序尝试运行我的 VBS 自定义操作时,为什么会出现 1720 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/278999/

相关文章:

pdf - PDF 的 BitsPerComponent 如何转换为图像的每像素位数?

.net - .NET : System. InvalidOperationException :

wpf - ListBox 中的 TextBox、Button 和 ListBox

vb.net - 将参数用于 Oracle ODBC 连接

.htaccess - 需要 mod_rewrite URL 信息

installation - 如何通过 .msi 包修改 machine.config

python - sys.getrefcount 继续

sql-server-2005 - 强制 SQL Server 列为特定值

sql-server - 从现有数据库生成 SQL DDL 和内容的工具

c++-cli - 如何将 System::IntPtr 转换为 char*