Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Installer
Custom Actions
Custom Action Types
 Custom Action Type 35

  Switch on low bandwidth view
Custom Action Type 35

This custom action sets the install directory from a formatted text string. For more information, see Changing the Target Location for a Directory

Source

The Source field of the CustomAction table contains a key to the Directory table. The designated directory is set by the formatted string in the Target field using MsiSetTargetPath. This sets the target path and associated property to the expanded value of the formatted text string in the Target field. Do not attempt to change the location of a target directory during a maintenance installation. Do not attempt to change the target directory path if some components using that path are already installed for any user.

Type Value

Include the following value in the Type column of the CustomAction table to specify the basic numeric type.

ConstantsHexadecimalDecimal
msidbCustomActionTypeTextData + msidbCustomActionTypeDirectory0x02335

 

Target

The Target column of the CustomAction table contains a text string formatted using the functionality specified in MsiFormatRecord (without the numeric field specifiers). Parameters to be replaced are enclosed in square brackets […], and may be properties, environment variables (% prefix), file paths (# prefix), or component directory paths ($ prefix). Note that directory paths always end with a directory separator.

Return Processing Options

The custom action does not use these options.

Execution Scheduling Options

Include optional flag bits in the Type column of the CustomAction table to specify execution scheduling options. These options control the multiple execution of custom actions. For a description of the options, see Custom Action Execution Scheduling Options.

In-Script Execution Options

The custom action does not use these options.

Return Values

See Custom Action Return Values.

Remarks

If you set a private property in the UI sequence by authoring a custom action in one of the user interface sequence tables, that property is not set in the execution sequence. To set the property in the execution sequence you must also put a custom action in an execution sequence table. Alternatively, you can make the property a public property and include it in the SecureCustomProperties property.

See Also

Custom_Actions
Formatted Text Custom Actions

Send comments about this topic to Microsoft

Build date: 6/25/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Constants are defined in msidefs.h from the Windows Platform SDK's Include directory      Robert Flaming - MSFT   |   Edit   |   Show History

The include file msidefs.h from platform SDK's include directory contain the definitions of the constants msidbCustomActionTypeTextData, and msidbCustomActionTypeDirectory. In this case, you'll want to check the enum msidbCustomActionType for these values.

// CustomAction.Type
enum msidbCustomActionType
{
 // executable types
 msidbCustomActionTypeTextData         = 0x00000003,  // Target = text string to be formatted and set into property
 ...
 msidbCustomActionTypeDirectory        = 0x00000020,  // Source = Directory.Directory, folder containing existing file
 ...
}


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

Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker