Page tree
Skip to end of metadata
Go to start of metadata

%GetDefaultRegValue function

The function retrieves the default value of the specified key in the Windows system registry.
TEXT  %GetDefaultRegValue(
   TEXT in keyNameStr, 
   TEXT in defValue

keyNameStr Key name in the Registry.
defValue Default value.

The function will read a default value of the key from the registry. The name of read key is keyNameStr. If the key does not exist, the function will return the default value defValue and write this value as the default value of the key. So, the function generates the key, if does not exist.
The type of return value is TEXT as the default value of registry key is a string.
In the following example, the default value of registry key HKEY_LOCAL_MACHINE\SOFTWARE\Ipesoft is performed:

Windows registry editor

TEXT _value
 _value := %GetDefaultRegValue("HKEY_LOCAL_MACHINE\SOFTWARE\Ipesoft","")

Write a comment…