Authoring the Launch Custom Action

Windows Installer

Authoring the Launch Custom Action

The source code for a sample custom action named Launch, which meets the sample specifications, is provided by the Windows Installer SDK as the file Tutorial.cpp. This custom action makes use of MsiFormatRecord to format a string containing properties. The property [#FileKey] resolves to the full path of the HTML file. Use the source file to create the file Tutorial.dll. The entry point to this DLL is LaunchTutorial.

The sample custom action Launch calls a DLL written in C++ and is generated from a temporary binary stream. Custom actions of this type include the base type constants msidbCustomActionTypeDll and msidbCustomActionTypeBinaryData, which give a base numeric type equal to 1. See Custom Action Type 1. Because the specifications require that the installation continue if the custom action fails, Launch also includes the optional constant msidbCustomActionTypeContinue, which is 64. See Custom Action Return Processing Options. The total numeric type of Launch is 65.

Continue to Adding Launch to the CustomAction and Binary Tables.

Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.