Custom Action Types

The following table identifies the basic types of custom actions and shows the values that are in the Type, Source, and Target fields of the CustomAction table for each type. The basic custom actions can be modified by including optional flag bits in the Type column. For descriptions of the options and the values, see the following:

Use the links to the Basic Custom Action Type for a description and the options available for each type.

Basic custom action typeTypeSourceTarget
Custom Action Type 1

DLL file stored in a Binary table stream.

1Key to Binary table. DLL entry point.
Custom Action Type 2

EXE file stored in a Binary table stream.

2Key to Binary table.Command-line string.
Custom Action Type 5

JScript file stored in a Binary table stream.

5Key to Binary table.An optional JScript function that can be called.
Custom Action Type 6

VBScript file stored in a Binary table stream.

6Key to Binary table.An optional VBScript function that can be called.
Custom Action Type 17

DLL file that is installed with a product.

17Key to File table.DLL entry point.
Custom Action Type 18

EXE file that is installed with a product.

18Key to File table.Command-line string.
Custom Action Type 19

Displays a specified error message and returns failure, terminating the installation.

19BlankFormatted text string. The literal message or an index into the Error table.
Custom Action Type 21

JScript file that is installed with a product.

21Key to File table.An optional JScript function that can be called.
Custom Action Type 22

VBScript file that is installed with a product.

22Key to File table.An optional VBScript function that can be called.
Custom Action Type 34

EXE file having a path referencing a directory.

34Key to Directory table. This is the working directory for execution. The Target column is formatted and contains the full path and name of the executable file followed by optional arguments.
Custom Action Type 35

Directory set with formatted text.

35A key to the Directory table. The designated directory is set by the formatted string in the Target field.A formatted text string.
Custom Action Type 37

JScript text stored in this sequence table.

37NullA string of JScript code.
Custom Action Type 38

VBScript text stored in this sequence table.

38NullA string of VBScript code.
Custom Action Type 50

EXE file having a path specified by a property value.

50Property name or key to Property table.Command-line string.
Custom Action Type 51

Property set with formatted text.

51Property name or key to the Property table. This property is set by the formatted string in the Target field.A formatted text string.
Custom Action Type 53

JScript text specified by a property value.

53Property name or key to Property table.An optional JScript function that can be called.
Custom Action Type 54

VBScript text specified by a property value.

54Property name or key to Property table.An optional VBScript function that can be called.

 

In addition, the following custom action types are used with concurrent installations:

Send comments about this topic to Microsoft

Build date: 11/12/2009

Tags :


Community Content

Robert Flaming - MSFT
For more detail, see msidefs.h from the Platform SDK's Include directory

Consider reviewing the file msidefs.h from platform SDK's include directory for more insights. In this case, you'll want to check the enum msidbCustomActionType for the first ten values.

// CustomAction.Type
enum msidbCustomActionType
{
// executable types
msidbCustomActionTypeDll = 0x00000001, // Target = entry point name
msidbCustomActionTypeExe = 0x00000002, // Target = command line args
msidbCustomActionTypeTextData = 0x00000003, // Target = text string to be formatted and set into property
msidbCustomActionTypeJScript = 0x00000005, // Target = entry point name, null if none to call
msidbCustomActionTypeVBScript = 0x00000006, // Target = entry point name, null if none to call
msidbCustomActionTypeInstall = 0x00000007, // Target = property list for nested engine initialization
 // source of code
msidbCustomActionTypeBinaryData = 0x00000000, // Source = Binary.Name, data stored in stream
msidbCustomActionTypeSourceFile = 0x00000010, // Source = File.File, file part of installation
msidbCustomActionTypeDirectory = 0x00000020, // Source = Directory.Directory, folder containing existing file
msidbCustomActionTypeProperty = 0x00000030, // Source = Property.Property, full path to executable
 ...
}

The MSDN topic above covers the valid combinations of these bit flags.

Robert Flaming
Windows Installer Program Manager
Team Blog: http://blogs.msdn.com/windows_installer_team
Individual Blog: http://blogs.msdn.com/rflaming

Tags : msidefs.h

Gideon7
Some privileges are disabled for the System account in deferred EXE Custom Actions
Note: When a deferred custom action (CA) invokes an EXE via msidbCustomActionTypeExe with impersonation turned off (msidbCustomActionTypeNoImpersonate), the EXE runs under the System account. The System account typically has all privileges on the computer. However, MSI version 4.5 will revoke certain privileges before it launches the EXE under the System account. The revoked privileges include the following:

  • SeCreateSymbolicLinkPrivilege
  • SeDebugPrivilege
  • SeIncreaseWorkingSetPrivilege
  • SeManageVolumePrivilege
  • SeSystemEnvironmentPrivilege
  • SeSystemProfilePrivilege
  • SeSystemtimePrivilege
  • SeUndockPrivilege

You need to take this into account when designing your CA.

This behavior was observed under Vista SP2.


Page view tracker