PseudoVariables: reading from Registry and Environment

Top  Previous  Next

AWinstall supports the Variables syntax for easy access to the System Registry and Environment variables.

To get a System Registry key, use the following syntax: ${REG:RegistryPath}. For example, ${REG:HKLM\SOFTWARE\Microsoft\Internet Explorer\Version} returns the version of Internet Explorer installed on the target machine.

The following predefined registry roots are available:

Root string

Value

HKLM

HKEY_LOCAL_MACHINE

HKCU

HKEY_CURRENT_USER

HKCR

HKEY_CLASSES_ROOT

HKCC

HKEY_CURRENT_CONFIG

To read an Environment variable, use the following syntax: ${ENV:VariableName}. For example, ${ENV:NUMBER_OF_PROCESSORS} returns the number of processors installed in the target system.

You can use the Pseudo-Variables either in your scripts (for example, in the Installer.Variables method) or directly in your tasks and actions:

environment