Registry Object

InstallShield 2024 » Object Expressions for Advanced UI and Suite/Advanced UI Projects

Project: This information applies to the following project types:

Advanced UI
Suite/Advanced UI

To create an object expression that checks the registry on target systems during an Advanced UI or Suite/Advanced UI installation, use the Registry object.

Syntax

[@Registry(RegistryKeyPath,64Bit).KeyValue(DataValueName)]

[@Registry(RegistryKeyPath,64Bit).Value]

Parameters

The following parameters are available for the Registry object.

Parameters for the Registry Object

Parameter

Description

RegistryKeyPath

Specify the full path of the registry key that you want to check on target systems. Use the following abbreviations for the root:

HKCR
HKCU
HKLM

64Bit

Use this optional Boolean parameter to indicate whether to check the 64-bit view of the registry. Valid options are:

true—Check the 64-bit view of the registry.
false—Check the 32-bit view of the registry.

If you omit this property, or if the target system is running a 32-version of Windows, the installation checks the 32-bit view of the registry.

Properties

The following properties are available for the Registry object.

Properties for the Registry Object

Property

Description

KeyValue

Retrieve the value data of the value that is passed as a parameter for the KeyValue property.

Value

Retrieve the value data of the registry key’s default value.

Examples

The following examples demonstrate use of the Registry object in object expressions.

Sample Registry Object Expressions

Expression

Description

[@Registry(HKLM\Software\Microsoft\
Windows NT\CurrentVersion, false).
KeyValue(RegisteredOwner)]

On 32-bit target systems, obtain the value data of the RegisteredOwner value for the following registry key:

HKLM\Software\Microsoft\Windows NT\CurrentVersion

On 64-bit target systems, obtain the value data of the RegisteredOwner value for the following registry key:

HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion

[@Registry(HKLM\Software\[COMPANY]\
[PRODUCT], true).Value]

On 32-bit and 64-bit target systems, obtain the value data of the default value for the following registry key:

HKLM\Software\My Company Name\My Product Name

[@Registry(HKCR\Software\My Company Name\My Product Name, false).KeyValue(MyFile[\[]1[\]].exe)]

On 32-bit target systems, obtain the value data of the MyFile[1].exe value for the following registry key:

HKCU\Software\My Company Name\My Product Name

On 64-bit target systems, obtain the value data of the MyFile[1].exe value for the following registry key:

HKLM\Software\Wow6432Node\My Company Name\My Product Name

To avoid treating the square brackets in the data value name as parameter parse indicators, the square brackets are escaped as shown in the sample expression.

See Also