このページはアーカイブされた古いページです。
インストーラ講座の目次へ



Windows インストーラ講座 − 定数一覧

Standard Actions

Action name Brief description of action
ADMIN A top-level action used for an administrative installation.
ADVERTISE A top-level action called to install or remove advertised components.
AllocateRegistrySpace Validates that the free space specified by AVAILABLEFREEREG exists in the registry.
AppSearch Searches for previous versions of products and determines that upgrades are installed.
BindImage Binds executables to imported DLLs.
CCPSearch Uses file signatures to validate that qualifying products are installed on a system before an upgrade installation is performed.
CostFinalize Ends the internal installation costing process begun by the CostInitialize action.
CostInitialize Starts the installation costing process.
CreateFolders Creates empty folders for components.
CreateShortcuts Creates shortcuts.
DeleteServices Removes system services.
DisableRollback Disables rollback for the remainder of the installation.
DuplicateFiles Duplicates files installed by the InstallFiles action.
ExecuteAction Checks the EXECUTEACTION property to determine which top-level action begins the execution sequence, then runs that action.
FileCost Initializes disk cost calculation with the installer. Disk costing is not finalized until the CostFinalize action is executed.
FindRelatedProducts Detects correspondence between the Upgrade table and installed products.
ForceReboot Used in the action sequence to prompt the user for a restart of the system during the installation.
INSTALL A top-level action called to install or remove components.
InstallAdminPackage Copies the installer database to the administrative installation point.
InstallExecute Runs a script containing all operations in the action sequence since either the start of the installation or the last InstallFinalize action. Does not end the transaction.
InstallFiles Copies files from the source to the destination directory.
InstallFinalize Runs a script containing all operations in the action sequence since either the start of the installation or the last InstallFinalize action. Marks the end of a transaction.
InstallInitialize Marks the beginning of a transaction.
InstallSFPCatalogFile The InstallSFPCatalogFile action installs the catalogs used by Windows?Me for Windows File Protection.
InstallValidate Verifies that all volumes with attributed costs have sufficient space for the installation.
IsolateComponents Processes the IsolatedComponent table
LaunchConditions Evaluates a set of conditional statements contained in the LaunchCondition table that must all evaluate to True before the installation can proceed.
MigrateFeatureStates Migrates current feature states to the pending installation.
MoveFiles Locates existing files and moves or copies those files to a new location.
MsiConfigureServices Configures a service for the system.
Windows Installer 4.5 and earlier: Not supported.
MsiPublishAssemblies action Manages the advertisement of common language runtime assemblies and Win32 assemblies that are being installed.
MsiUnpublishAssemblies Manages the advertisement of common language runtime assemblies and Win32 assemblies that are being removed.
InstallODBC Installs the ODBC drivers, translators, and data sources.
InstallServices Registers a service with the system.
PatchFiles Queries the Patch table to determine which patches are applied to specific files and then performs the byte-wise patching of the files.
ProcessComponents Registers components, their key paths, and component clients.
PublishComponents Advertises the components specified in the PublishComponent table.
PublishFeatures Writes the feature state of each feature into the system registry
PublishProduct Publishes product information with the system.
RegisterClassInfo Manages the registration of COM class information with the system.
RegisterComPlus The RegisterComPlus action registers COM+ applications.
RegisterExtensionInfo Registers extension related information with the system.
RegisterFonts Registers installed fonts with the system.
RegisterMIMEInfo Registers MIME information with the system.
RegisterProduct Registers product information with the installer and stores the installer database on the local computer.
RegisterProgIdInfo Registers OLE ProgId information with the system.
RegisterTypeLibraries Registers type libraries with the system.
RegisterUser Registers user information to identify the user of a product.
RemoveDuplicateFiles Deletes files installed by the DuplicateFiles action.
RemoveEnvironmentStrings Modifies the values of environment variables.
RemoveExistingProducts Removes installed versions of a product.
RemoveFiles Removes files previously installed by the InstallFiles action.
RemoveFolders Removes empty folders linked to components set to be removed.
RemoveIniValues Deletes .ini file information associated with a component specified in the IniFile table.
RemoveODBC Removes ODBC data sources, translators, and drivers.
RemoveRegistryValues Removes an application's registry keys that were created from the Registry table..
RemoveShortcuts Manages the removal of an advertised shortcut whose feature is selected for uninstallation.
ResolveSource Determines the source location and sets the SourceDir property.
RMCCPSearch Uses file signatures to validate that qualifying products are installed on a system before an upgrade installation is performed.
ScheduleReboot Prompts the user for a system restart at the end of the installation.
SelfRegModules Processes modules in the SelfReg table and registers them if they are installed.
SelfUnregModules Unregisters the modules in the SelfReg table that are set to be uninstalled.
SEQUENCE Runs the actions in a table specified by the SEQUENCE property.
SetODBCFolders Action Checks the system for existing ODBC drivers and sets target directory for new ODBC drivers.
StartServices Starts system services.
StopServices Stops system services.
UnpublishComponents Manages the unadvertisement of components from the PublishComponent table and removes information about published components.
UnpublishFeatures Removes the selection-state and feature-component mapping information from the system registry.
UnregisterClassInfo Manages the removal of COM classes from the system registry.
UnregisterComPlus The UnregisterComPlus action removes COM+ applications from the registry.
UnregisterExtensionInfo Manages the removal of extension-related information from the system.
UnregisterFonts Removes registration information about installed fonts from the system.
UnregisterMIMEInfo Unregisters MIME-related information from the system registry.
UnregisterProgIdInfo Manages the unregistration of OLE ProgId information with the system.
UnregisterTypeLibraries Unregisters type libraries with the system.
ValidateProductID Sets ProductID property to the full product identifier.
WriteEnvironmentStrings Modifies the values of environment variables.
WriteIniValues Writes .ini file information.
WriteRegistryValues Sets up registry information.


Custom Action - Basic custom action

Type Action Source Target
1 DLL file stored in a Binary table stream. Key to Binary table. DLL entry point.
2 EXE file stored in a Binary table stream. Key to Binary table. Command-line string.
5 JScript file stored in a Binary table stream. Key to Binary table An optional JScript function that can be called.
6 VBScript file stored in a Binary table stream. Key to Binary table. An optional VBScript function that can be called.
17 DLL file that is installed with a product. Key to File table. DLL entry point.
18 EXE file that is installed with a product. Key to File table. Command-line string.
19 Displays a specified error message and returns failure, terminating the installation. Blank Formatted text string. The literal message or an index into the Error table.
21 JScript file that is installed with a product. Key to File table. An optional JScript function that can be called.
22 VBScript file that is installed with a product. Key to File table. An optional VBScript function that can be called.
34 EXE file having a path referencing a directory. Key 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.
35 Directory set with formatted text. A key to the Directory table. The designated directory is set by the formatted string in the Target field. A formatted text string.
37 JScript text stored in this sequence table. Null A string of JScript code.
38 VBScript text stored in this sequence table. Null A string of VBScript code.
50 EXE file having a path specified by a property value. Property name or key to Property table. Command-line string.
51 Property set with formatted text. Property name or key to the Property table. This property is set by the formatted string in the Target field. A formatted text string.
53 JScript text specified by a property value. Property name or key to Property table. An optional JScript function that can be called.
54 VBScript text specified by a property value. Property name or key to Property table. An optional VBScript function that can be called.


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

Type Action Source Target
7 The Custom Action Type 7 is used with concurrent installations. Concurrent installations are not recommended for the installation of applications intended for release to the public. For more information about concurrent installations please see Concurrent Installations. This custom action installs another installer package that is nested inside of the first package. The database of the concurrent application is stored as a substorage of the package, and the name of the substorage is designated in the Source field of the CustomAction table. The Target field of the CustomAction table contains property settings to be passed to the concurrent installation. These property settings can specify features.
Return Processing Options
The concurrent installation session runs as a separate thread in the current process. A concurrent installation cannot run asynchronously. See Custom Action Return Processing Options.

Execution Scheduling Options
Options flags are available to control the potential multiple execution of custom actions. see Custom Action Execution Scheduling Options.

In-Script Execution Options
This custom action does not use this option.

Return Values
The return status of user exit, failure, suspend, or success from a concurrent installation is processed in the same way as any other action. Note however that Windows Installer translates the return values from all actions when it writes the return value into the log file. For example, if the action return value appears as 1 in the log file, this means that the action returned ERROR_SUCCESS. For more information about this translation see Logging of Action Return Values.Note that if a concurrent install has msidbCustomActionTypeContinue set, then a return of ERROR_INSTALL_USEREXIT, ERROR_INSTALL_REBOOT, ERROR_INSTALL_REBOOT_NOW, or ERROR_SUCCESS_REBOOT_REQUIRED is treated as ERROR_SUCCESS. This means that if you set msidbCustomActionTypeContinue and your concurrent installation requires a restart, the requirement for the restart will be ignored. Additionally, the error code from the concurrent installation custom action will be ignored.If msidbCustomActionTypeContinue is not set, the following return codes plus ERROR_SUCCESS are treated as success and have the following meanings. Other return codes are treated as failure. See Custom Action Return Values.

Remarks
A conditional expression is required to enable the concurrent installation at either installation or removal of the associated component or feature.
Type Action Source Target
23 The Custom Action Type 23 is used with concurrent installations. Concurrent installations are not recommended for the installation of applications intended for release to the public. For information about concurrent installations please see Concurrent Installations. This custom action installs another installer package that resides in the application's source tree. The location of the concurrent installation package is specified relative to the root of the source location shown in the Source field of the CustomAction table. The Target field of the CustomAction table contains property settings that are to be passed to the concurrent installation. These property settings can specify features.
Return Processing Options
The concurrent installation session runs as a separate thread in the current process. A concurrent installation cannot run asynchronously.For more information, See Custom Action Return Processing Options.

Execution Scheduling Options
Options flags are available to control the potential multiple execution of custom actions. For more information, see Custom Action Execution Scheduling Options.

In-Script Execution Options
Not used.

Return Values
The return status of user exit, failure, suspend, or success from a concurrent installation is processed in the same way as any other action. Note however, that Windows Installer translates the return values from all actions when it writes the return value into the log file. For example, if the action return value appears as 1 in the log file, this means that the action returned ERROR_SUCCESS. For more information, see Logging of Action Return Values.Note that if a concurrent installation has msidbCustomActionTypeContinue set, then a return of ERROR_INSTALL_USEREXIT, ERROR_INSTALL_REBOOT, ERROR_INSTALL_REBOOT_NOW, or ERROR_SUCCESS_REBOOT_REQUIRED is treated as ERROR_SUCCESS. This means that if you set msidbCustomActionTypeContinue and your concurrent installation requires a restart, the requirement for the restart will be ignored. Additionally, the error code from the concurrent installation custom action will be ignored.If msidbCustomActionTypeContinue is not set, the following return codes plus ERROR_SUCCESS are treated as success and have the following meanings. Other return codes are treated as failure. See Custom Action Return Values.

Remarks
A conditional expression is required to enable the concurrent installation at either installation or removal of the associated component or feature.
Type Action Source Target
39 The Custom Action Type 39 is used with concurrent installations. Concurrent installations are not recommended for the installation of applications intended for release to the public. For information about concurrent installations please see Concurrent Installations. Type 39 custom action installs an application that is advertised or already installed. This custom action type may be used to reinstall or remove a product that has been installed as a concurrent installation by the current product's installation package. The Type 39 custom action cannot be used to reinstall or remove any product previously installed by any other means. For example, if the secondary product is installed using a Type 39, Type 23, or Type 7 custom action during the installation of the primary product, a Type 39 custom action may be used to remove the secondary product when the primary product is uninstalled. The Source field of the CustomAction table contains the product code for the application. The Target field of the CustomAction table contains property settings that are to be passed to the concurrent installation. These property settings can specify features.
Return Processing Options
The custom action type 39 fails if the application is not advertised or installed. To avoid this failure, you must set the msidbCustomActionTypeContinueflag.A concurrent install cannot run asynchronously. See Custom Action Return Processing Options.

Execution Scheduling Options
Options flags are available to control the potential multiple execution of custom actions. see Custom Action Execution Scheduling Options.

In-Script Execution Options
The custom action does not use this option.

Return Values
The return status of user exit, failure, suspend, or success from a concurrent installation is processed in the same way as any other action. Note however that Windows Installer translates the return values from all actions when it writes the return value into the log file. For example, if the action return value appears as 1 in the log file, this means that the action returned ERROR_SUCCESS. For more information, see Logging of Action Return Values.Note that if a concurrent installation has msidbCustomActionTypeContinue set, then a return of ERROR_INSTALL_USEREXIT, ERROR_INSTALL_REBOOT, ERROR_INSTALL_REBOOT_NOW, or ERROR_SUCCESS_REBOOT_REQUIRED is treated as ERROR_SUCCESS. This means that if you set msidbCustomActionTypeContinue and your concurrent installation requires a restart, the requirement for the restart will be ignored. Additionally, the error code from the concurrent installation custom action will be ignored.If msidbCustomActionTypeContinue is not set, the following return codes plus ERROR_SUCCESS are treated as success and have the following meanings. Other return codes are treated as failure. See Custom Action Return Values.

Remarks
A conditional expression is required to enable the concurrent installation at either installation or removal of the associated component or feature.


Custom Action Return Processing Options.

Constant Hexadecimal Decimal Description
 (none)  0x00000000  0 A synchronous execution that fails if the exit code is not 0 (zero). If the flag msidbCustomActionTypeContinue is not set, then the custom action must return one of the return values that is described in Custom Action Return Values.
同期実行する。終了コードが0以外(エラー発生)のとき、インストール作業は失敗する。
 msidbCustomActionTypeContinue  0x00000040  64 A synchronous execution that ignores exit code and continues.
終了コードが0以外(エラー発生)でもを無視して継続する
 msidbCustomActionTypeAsync  0x00000080  128 An asynchronous execution that waits for exit code at the end of the sequence.This option cannot be used with Concurrent Installations, Rollback Custom Actions, or Script Custom Actions.
非同期実行する。
 msidbCustomActionTypeAsync
+ msidbCustomActionTypeContinue
 0x00000040
+ 0x00000080
 64
+ 128
= 192
An asynchronous execution that does not wait for completion.Execution continues after Windows Installer terminates.This option can only be used with the EXE type custom actions?that is, executable files. All other types of custom actions can be asynchronous only within the install session, and must end for the installation to terminate.This option cannot be used with Concurrent Installations.
エラーを無視して非同期実行する。


Custom Action Execution Scheduling Options.

Constant Hexadecimal Decimal Description
 (default)  0x00000000  0 Always execute. Action may run twice if present in both sequence tables.
 msidbCustomActionTypeFirstSequence  0x00000100  256 Execute no more than once if present in both sequence tables. Always skips action in execute sequence if UI sequence has run. No effect in UI sequence. The action is not required to be present or run in the UI sequence to be skipped in the execute sequence. Not affected by install service registration.
 msidbCustomActionTypeOncePerProcess  0x00000200  512 Execute once per process if in both sequence tables. Skips action in execute sequence if UI sequence has been run in same process, for example both run in the client process. Used to prevent actions that modify the session state, such as property and database data, from running twice.
 msidbCustomActionTypeClientRepeat  0x00000300  768 Note that to run a custom action during two different run modes, author two entries into the CustomAction table . For example, to have a custom action that calls a C/C++ dynamic link library (DLL) ( Custom Action Type 1) both when the mode is MSIRUNMODE_SCHEDULED and MSIRUNMODE_ROLLBACK, put two entries in the CustomAction table that call the same DLL but that have different numeric types. Include code that calls MsiGetMode to determine when to run which custom action.


Custom Action In-Script Execution Options.

Constant Hexadecimal Decimal Description
 (none)  0x00000000  0 Immediate execution.
 msidbCustomActionTypeInScript  0x00000400  1024 Queues for execution at scheduled point within script. This flag designates that this is a deferred execution custom action.
 msidbCustomActionTypeInScript
+ msidbCustomActionTypeRollback
 0x00000400
+ 0x00000100
 1024
+ 256
= 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
 0x00000400
+ 0x00000200
 1024
+ 512
= 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
 0x00000400
+ 0x00000800
 1024
+ 2048
= 3072
Queues for execution at scheduled point within script. Executes with no user impersonation. Runs in system context.
 msidbCustomActionTypeInScript
+ msidbCustomActionTypeNoImpersonate
+ msidbCustomActionTypeRollback
 0x00000400
+ 0x00000800
+ 0x00000100
 1024
+ 2048
+ 256
= 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
 0x00000400
+ 0x00000800
+ 0x00000200
 1024
+ 2048
+ 512
= 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
 0x00000400
+ 0x00004000
1024
+ 16384
= 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
 0x00000400
+ 0x00004000
+ 0x00000100
 1024
+ 16384
+ 256
= 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
 0x00000400
+ 0x00004000
+ 0x00000200
 1024
+ 16384
+ 512
= 17920
ues 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.



Custom Action Patch Uninstall Option.

Constant Hexadecimal Decimal Description
 msidbCustomActionTypePatchUninstall  0x8000  32768 The custom action runs only when a patch is being uninstalled.


Custom Action NoImpersonate Option.

Constant Hexadecimal Decimal Description
 msidbCustomActionTypeNoImpersonate  0x00000800  2048 UAC有効化において、管理者権限で実行する。


Logging of Action Return Values.

Error Code Values returned by function calls MsiExec.exe, and InstMsi.exe EValues that appear in the Log.< Description
 ERROR_FUNCTION_NOT_CALLED  1626  0
 ERROR_SUCCESS  0  1 An action completed successfully.
 ERROR_INSTALL_USEREXIT  1602  2 A user canceled installation.
 ERROR_INSTALL_FAILURE  1603  3 A fatal error.
 ERROR_INSTALL_SUSPEND  1604  4 The installation suspended, incomplete.
 ERROR_SUCCESS  0  5 The action completed successfully.
 ERROR_INVALID_HANDLE_STATE  1609  6 The handle is in an invalid state.
 ERROR_INVALID_DATA  1626  7 The data is invalid.
 ERROR_INSTALL_ALREADY_RUNNING  1618  8 Another installation is in progress. Only one installation at a time can run actions in the InstallExecuteSequence, AdminExecuteSequence, or AdvtExecuteSequence tables.


Custom Action Return Values.

Message Meaning
 ERROR_INSTALL_REBOOT The restart flag will be set to restart at end of the installation.
 ERROR_INSTALL_REBOOT_NOW A restart is required before completing the installation. The restart will be processed immediately.
 ERROR_SUCCESS_REBOOT_REQUIRED A restart was required, but was suppressed.

参考URL
Standard Actions Reference
Custom Action Types
Custom Action Type 7
Custom Action Type 23
Custom Action Type 39
Custom Action Return Processing Options
Custom Action Execution Scheduling Options
Custom Action In-Script Execution Options
Custom Action Patch Uninstall Option
Logging of Action Return Values



インストーラ講座の目次へページ最上部へ