Home > Language Reference > System Functions > DeleteRegKey

DeleteRegKey

The DeleteRegKey function removes the specified key from the registry.

Usage

Use all registry functions with caution. If you are unfamiliar with the Windows Registry we recommend that you do not use these functions. Removing or modifying a registry entry can cause your system to become unstable.

Syntax

ret = DeleteRegKey(<registry_key>)

Parameters

<registry_key>. string, registry key (folder) to delete.

Return value

ret, optional numeric return value. If the function has successfully deleted the key, the return value is 0. If the function fails, the return value is a nonzero value (see System Functions Error Codes).

See also

DeleteRegValue
ReadReg
WriteReg

Example

ret=DeleteRegKey("HKEY_CURRENT_USER\Software\WinTask\WinTask 1.0\TASKEDIT\Recent File List")