CreateRegistrySet

InstallShield 2015 » InstallScript Language Reference

The CreateRegistrySet function creates the registry entries specified by one or all registry sets in the current media that are not associated with a particular component. (The name of the current media is stored in the system variable MEDIA.)

It is not necessary to call CreateRegistrySet for registry sets that are associated with one or more components since this function has no effect on the these registry sets. Registry entries stored in registry sets that are associated with components are created when the component itself is installed (for example, via a FeatureTransferData call).

Note: When you enable the REGDB_OPTION_WOW64_64KEY option, this affects where registry entries from registry sets are created. For example, if this option is enabled when you call the CreateRegistrySet function, the registry set is created in the 64-bit part of the registry. Note that this includes the default registry set which is created during file transfer immediately after the OnMoving event returns, and registry sets associated with components which are automatically created when the component is installed. Therefore, to avoid the data from these registry sets being created in the 64-bit portion of the registry unintentionally, it is recommended that you set this option only during the calling of the appropriate registry APIs in your script, then disable the option before continuing with the script.

Syntax

CreateRegistrySet (szRegistrySet);

Parameters

CreateRegistrySet Parameters

Parameter

Description

szRegistrySet

Specifies the name of a registry set that is not associated with a particular component in the current media. To create all registry sets that are defined in the current media and are not associated with a particular component, pass a null string ("") in this parameter.

Return Values

CreateRegistrySet Return Values

Return Value

Description

0

Indicates that the function was successful.

< 0

Indicates that an unspecified error has occurred.

Additional Information

The value of the system variable MEDIA is set to 'DATA' during setup initialization. If you change the value of this variable to refer to a script-created feature set, you must change the value back to 'DATA' before calling CreateRegistrySet.
If a registry set is associated only with components that are not included in the built media (because either they are not included in any features, they are included only in features whose Include in Build property is set to No, or they are included only in features that you have excluded from the built media using the Release Wizard’s Features panel), the registry set's entries are not automatically created during file transfer and can be installed by a call to CreateRegistrySet.

See Also