Delete Registry Key and Sub Keys with VBScript.
Posted on 2006-11-12
I want to delete a branch from the registry key including sub keys.
I found the following VB example from a previous post ( Q_21245922 ).
Can some one show me how to do the same thing in VBScript.
Public Const HKEY_CURRENT_USER = &H80000001
Private Const HKEY_LOCAL_MACHINE = &H80000002
Private Declare Function SHDeleteKey Lib "shlwapi.dll" Alias "SHDeleteKeyA" (ByVal hkey As Long, ByVal pszSubKey As String) As Long
Private Sub Command1_Click()
SHDeleteKey HKEY_CURRENT_USER, "Software\Microsoft\ABC"