Previous Topic: Maintaining Parameter ValuesNext Topic: Packager Scripts


Using Client Parameters to Access System-specific Registry Entries

The possibility to assign local registry values to client parameters provides access to nearly all important system and application configuration information. Any local registry value under the HKEY_LOCAL_MACHINE root may be assigned to parameters of type Alphanumeric, by using a placeholder of the following form:

&HKLM\subkey\name
subkey

Specifies a sub key of HKEY_LOCAL_MACHINE

name

Specifies a registry value name. The current registry value is evaluated when the installation starts. If the value is not available the installation fails.

The value data of a registry value of type DWORD will be transformed into an ASCII string. All other types of registry values will be taken as a string. For example, for multi-string values only the first string is used.

Example:

Assumed any SXP archive file of a package requires the target computer name. Define an alphanumeric parameter, ComputerName, and assign as default value:

&HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName

During installation of the package, throughout the archive files, the variable $(ComputerName) is replaced with the local computer name.