Can a Type 38 custom action terminate the installation process from within the script?

No. A type 38 custom action always returns success. You can’t halt the installation with it.

The fine print for type 38 custom action on MSDN says:

Return Values

This custom action type always returns success.

Which means one cannot stop the installation using the regular return values.

This is further documented in Return Values of JScript and VBScript Custom Actions in the Windows Installer SDK, along with examples.

If you need to return an error, then change your custom action type so that it allows you to do so. There are quite a few VB script related custom action types, including type 6 which just means you embed the script in the Binary table of the package.

Content credit to

  • Carolyn, MSI Team Dev Lead. You can get other Carolyn insights about developing for Windows Installer from the Windows Installer Chat Archives
  • Heath, Developer Division Sustained Engineering Team Dev. You can get other Heath insights about developing for Windows Installer from Heath Stewart's Blog

[Author: Robert Flaming]
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at

Skip to main content