View Full Version : VBScript custom action

05-09-2002, 07:23 PM
Executing an msi that includes a vbscript code custom action generates an error "Error 1720. There is a problem with this windows Installer package. A script required for this install to complete cannot be run. Contact your support personnel or package vendor". I have tried the various action type to no avail. Can anyone shed some light on this problem?

05-10-2002, 05:33 AM
Try this, the simplest VBScript Custom Action:

Make a Type 38 Custom Action, which is a VBScript CA stored directly in the Custom Action

In the Target field (Or if you used the CA Wizard, you get a field to type code into) type

MsgBox "Hello From CA"

Put the CA into one of the Installation Sequences

You do need Scripting Runtime to be installed on the target machine for this to work


05-13-2002, 01:20 AM
A simple vbscript custom action using wsh object seems to work fine. However the VBScript I am using uses WMI (Windows Management Instrumentation) to enumerate registry keys and it seems that when I use a WMI procedure (in this case EnumKey) it is not recognized and the script fails. The error in the install log says "Microsoft VBScript runtime error: Invalid procedure call or argument: 'objRegistry.EnumKey'". However under normal conditions the script executes successfully.