The RegDelete method deletes from the registry the key or value named strName.
WshShell.RegDelete strName
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 |
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.RegDelete "HKCU\ScriptEngine\Value" ' Delete value "Value"
WshShell.RegDelete "HKCU\ScriptEngine\Key\" ' Delete key "Key"
WshShell.RegRead method, WshShell.RegWrite method