1. Check to ensure that the script runs from outside the Windows Installer. If it does not, the script won't run from inside a Windows Installer package.
2. Does the script contain or does the customer use a line of code that includes 'wscript.CreateObject'? Although this is acceptable code for a VB Script, this code will fail inside of the Windows Installer. The Windows Installer assumes that the Windows scripting engine (wscript) is running the VB Script already.
3. Does the main function of the script return an error number of 0?
Example: If the function is called 'functionA', the function should end with these two lines of code:
functionA = Err.Number
4. If you are unsure of the Err.Number, then you can use a Message Box to display this: Msgbox "Error Code " & Err.Number
5. Change the type of custom action from Run VBScript from Embedded Code to Run VBScript from Installation.
6. If the script is suppose to act on or be run from an installed file, make sure that it is run in deferred mode or that the custom action is placed after InstallFinalize.
7. Ensure that the custom action has a condition around it that only executes the custom action at the appropriate times. If the custom action is set to execute from installed files, the action should not be executed during uninstall. The condition should be NOT REMOVE~="ALL" to keep an action from executing during an install or NOT INSTALLED if it should be executed during installation only.
All Windows Installer versions
All Windows Operating Systems
Imported Document Id