views:

1879

answers:

1

The Custom Action is configured as follows:

Custom Action Name: MyCustomAction

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

ScriptFunction: MyFunction

Return Processing: Synchronous (Check exit code)

In-Script Execution: Immediate Execution

It is being executed via the following InstallScript code:

result = MsiDoAction(ISMSI_HANDLE,"MyCustomAction");

When the setup reaches that line in InstallScript, the installer shows an error alert, stating:

"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."

The result code returned by MsiDoAction is that of '1603', which, according to winerror.h, is:

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

Why is this happening? I was starting to doubt that the file was included properly. Yet, I am pointing to the correct file, and I've tried including the VBS via the InstallShield Support Files, thinking this would ensure the file was present with the setup, but same result.

+1  A: 

Running the setup with logging enabled revealed the problem:

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,)

To run a setup with logging enabled:

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

This forum thread was helpful.

Matt Refghi