cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VBScript custom action

CChong
By Level 11 Flexeran
Level 11 Flexeran
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?
(2) Replies
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

looeee
CChong
By Level 11 Flexeran
Level 11 Flexeran
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.