Determines if a registry key or value exists.

Syntax

Exists = SRP_Registry("EXISTS", Key, ValueName, Value, Error)

Returns

1 if the registry key or value exists, 0 if not.

Value

The Value parameter is not used by this service.

Errors

This service never returns an error.

Remarks

The EXISTS service simply determines if a registry key or value already exists. To determine if the key exists, set the Key parameter to an appropriate key path and set the ValueName parameter to "". To determine if a value exists, set the Key parameter to an appropriate key path and set the ValueName parameter to the value you wish to evaluate. SRP_Registry will return 1 if the item exists or 0 if doesn't exist.

Example

* Determine if a value exists
Exists = SRP_Registry("EXISTS", "HKCU\Software\MyApp", "ShowFullscreen")

* Determine if a key exists
Exists = SRP_Registry("EXISTS", "HKCU\Software\MyApp")
  • No labels