Custom Action In-Script Execution Options

You can use the following option flags to specify the in-script execution of custom actions. These options copy the action code into the execution, rollback, or commit script. To set an option add the value in this table to the value in the Type field of the CustomAction table.

Note that the msidbCustomActionTypeInScript must be included with each of these options.

TermDescription

(none)

Hexadecimal: 0x00000000

Decimal: 0

Immediate execution.

msidbCustomActionTypeInScript

Hexadecimal: 0x00000400

Decimal: 1024

Queues for execution at scheduled point within script. This flag designates that this is a deferred execution custom action.

msidbCustomActionTypeInScript + msidbCustomActionTypeRollback

Hexadecimal: 0x00000400 + 0x00000100

Decimal: 1280

Queues for execution at scheduled point within script. Executes only upon an installation rollback. This flag designates that this is a rollback custom action.

msidbCustomActionTypeInScript + msidbCustomActionTypeCommit

Hexadecimal: 0x00000400 + 0x00000200

Decimal: 1536

Queues for execution at scheduled point within script. Executes only upon install commit. This flag designates that this is a commit custom action.

msidbCustomActionTypeInScript + msidbCustomActionTypeNoImpersonate

Hexadecimal: 0x00000400 + 0x00000800

Decimal: 3072

Queues for execution at scheduled point within script. Executes with no user impersonation. Runs in system context.

msidbCustomActionTypeInScript + msidbCustomActionTypeNoImpersonate + msidbCustomActionTypeRollback

Hexadecimal: 0x00000400 + 0x00000800 + 0x00000100

Decimal: 3328

Queues for execution at scheduled point within script. Executes with no user impersonation. Runs in system context. This flag combination designates that this is a rollback custom action.

msidbCustomActionTypeInScript + msidbCustomActionTypeNoImpersonate + msidbCustomActionTypeCommit

Hexadecimal: 0x00000400 + 0x00000800 + 0x00000200

Decimal: 3584

Queues for execution at scheduled point within script. Executes with no user impersonation. Runs in system context. This flag combination designates that this is a commit custom action.

msidbCustomActionTypeTSAware + msidbCustomActionTypeInScript

Hexadecimal: 0x00000400 + 0x00004000

Decimal: 17408

Queues for execution at the scheduled point within script. Executes with user impersonation. Runs with user impersonation during per-machine installs on a server running the Terminal Server role service. Normal deferred execution custom actions, without this attribute, run with no user impersonation on a terminal server during per-machine installations. This attribute has no effect if the action also has the msidbCustomActionTypeNoImpersonate attribute.

Windows 2000 Server:  This flag is not available.

msidbCustomActionTypeTSAware + msidbCustomActionTypeInScript + msidbCustomActionTypeRollback

Hexadecimal: 0x00000400 + 0x00004000 + 0x00000100

Decimal: 17664

Queues for execution at the scheduled point within script. Run only upon an installation rollback. Execute with user impersonation. Runs with user impersonation during per-machine installs on a terminal server.

Windows 2000 Server:  This flag is not available.

msidbCustomActionTypeTSAware + msidbCustomActionTypeInScript + msidbCustomActionTypeCommit

Hexadecimal: 0x00000400 + 0x00004000 + 0x00000200

Decimal: 17920

Queues for execution at the scheduled point within script. Runs only upon an install commit. Executes with user impersonation. Runs with user impersonation during per-machine installs on a terminal server.

Windows 2000 Server:  This flag is not available.

 

 

For information about custom actions that run only when a patch is being uninstalled, see the Custom Action Patch Uninstall Option.

See Also

Custom Action Reference
About Custom Actions
Using Custom Actions

Send comments about this topic to Microsoft

Build date: 10/29/2009

Tags :


Community Content

Robert Flaming - MSFT
Frequent Package Compatibility Problem with User Account Control on Vista

One of the most frequent package compatibility issues found when users try their packages on Vista is the failure to properly set the msidbCustomActionTypeNoImpersonate bit.

I've blogged the conversation this error usually produces with customers at "The NoImpersonate Bit Mistake" (http://blogs.msdn.com/rflaming/archive/2006/09/23/768248.aspx)

With the permissions changes in the context of UAC, the server-side custom actions inside are script are executed as Standard User by default unless this bit is flipped. 

Conversations Around this Mistake

Generally folks make this mistake due to lack of awareness.

If the custom action is logging its errors, the trick is to look for an error code that translates to Access Denied.

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

All postings are provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm

Tags :

Page view tracker