Deletes a key and data items associated with the key.
RegDeleteKey(handle, subkey-string [,view-flag])
(i) handle an open registration database key (see below).
(s) subkey-string a path from the key provided to the desired key.
(i) view-flag [optional] controls which registry view the function uses when accessing the Windows registry.
0 - view indicated by the last call to the RegOpenFlags.
32 - use the 32-bit registry view.
64 - use the 64-bit registry view.
(i) @TRUE Key was deleted.; @FALSE Key was not found.
The RegDeleteKey function will delete a pre-existing key from the Registration Database. If the key does not exist, RegDeleteKey will fail. When using RegDeleteKey you must pass a pre-existing, open key to access the desired key. A pre-defined key may be used.
View-flag
This optional parameter controls which registry view the function uses when accessing the Windows registry. The optional parameter's values can be 32 to use the 32-bit view, 64 to use the 64-bit view, or 0 to use the view indicated by the last call to the RegOpenFlags. The parameter value of 0 can also causes a function to use the WinBatch default 64-bit view, if no call to RegOpenFlags has been made and setting the parameter to 0 is equivalent to omitting the parameter entirely.
Notes:
Using the 32 or 64 values cause these functions to error if a function's subkey parameter contains the string 'wow6432node'.
Setting the parameter to one of the valid values has no effect when running on 32-bit Windows.
; Delete default operation for *.DIZ files ; from the registration database ErrorMode(@OFF) RegDeleteKey(@REGCLASSES, ".diz") ErrorMode(@CANCEL) Message("Regdeletekey","*.DIZ files no longer associated with text editor")
RegOpenKey, RegCreateKey, RegCloseKey, RegDelValue and the section on Registration Database Operations