WshShell.RegDelete

The RegDelete method deletes from the registry the key or value named strName.

Syntax

WshShell.RegDelete strName
 

Parameters

strName
If strName ends with a backslash character (\), this method deletes the key instead of the value.

The strName parameter must begin with one of following root key names:
Short Long
HKCU HKEY_CURRENT_USER
HKLM HKEY_LOCAL_MACHINE
HKCR HKEY_CLASSES_ROOT
HKEY_USERS
HKEY_CURRENT_CONFIG

Example

Set WshShell = Wscript.CreateObject("Wscript.Shell")

WshShell.RegDelete "HKCU\ScriptEngine\Value"    ' Delete value "Value"
WshShell.RegDelete "HKCU\ScriptEngine\Key\"     ' Delete key "Key"
 

See Also

WshShell.RegRead method, WshShell.RegWrite method