$rkaccess function

$rkaccess(regpath)

The $rkaccess function returns a nonzero (True) value if the registry key specified by regpath exists and allows Read access, or zero (False) otherwise.

The result can be used in conditional expressions; see Examples below.

When checking for the registry key on a 64-bits Windows system, the function will check the 64-bits registry view first, and will check the 32-bits registry view only if the 64-bits view did not contain the registry key in question.

Tip: In most cases it is better to check the value of a specific registry value instead of checking for the presence of a registry key. Registry values can be read with a <@<HKLM>\regpath\regvalue> symbolic expression. The $rkaccess function is mostly useful if no registry value is available under the desired key.

Parameters

All parameters may contain symbolic references; these are resolved before the function is applied. See Examples below.

regpath
Registry path of the key whose access must be checked.

Examples

Here are some usage examples for this function:

<$rkaccess(<HKLM>\SOFTWARE\Microsoft\Windows\CurrentVersion\ThemeManager)>
Returns a nonzero value if the ThemeManager key exists and allows Read access, or zero (False) if not.
<$rkaccess(<UninstallRegPath>)>
Evaluates to a nonzero (True) value if the uninstaller key for the current product exists.