Previous Topic: regDeleteKey--Delete a Registry Key or a Key Hierarchy (Function)Next Topic: regGetKeyValues--Get Registry Key Value Information (Function)


regDeleteVal--Delete a Registry Value (Function)

The regSetVal function removes a value from the registry key specified by sKey on the local system or a remote system.

The function has the following syntax:

regDeleteVal(sKey, sValName)
sKey

Specifies the registry key.

sValName

Specifies the value.

If the function fails, it raises an exception. Otherwise, it returns true.

Examples

Delete value named "Label" from HKLM\Software\ACME with error handling:

try {
    regDeleteVal("HKLM\\Software\\ACME", "Label");
    ? "Success"
}
catch(e) {
    ? "Failure:", e
}

Delete a value on remote machine client8:

regDeleteVal("client8::HKLM\\Software\\ACME", "Name");

See also:

regDeleteKey--Delete a Registry Key or a Key Hierarchy (Function)

regSetVal--Set Registry Value (Function)