Previous Topic: regGetVal--Get Registry Value (Function)Next Topic: regIsVal--Check the Existence of a Registry Value (Function)


regIsKey--Check the Existence of a Registry Key (Function)

The regIsKey function checks if the specified registry key exists on the local or a remote system.

The function has the following syntax:

regIsKey(sKey)
sKey

Specifies the registry key.

The function returns a Boolean value indicating the presence of sKey:

true

Indicates that the key exists.

false

Indicates that the key does not exist.

Examples

Locate an ACME key under HKLM\SOFTWARE on the local system:

if(regIsKey("HKLM\\SOFTWARE\\ACME"))
? "Key was found!"
else
? "Key does not exist"

Perform the same check on the remote system ascl1:

if(regIsKey("ascl1::HKLM\\SOFTWARE\\ACME"))
? "Key was found"
else
? "Key does not exist"

See also:

regCreateKey--Create a Registry Key (Function)

regIsVal--Check the Existence of a Registry Value (Function)