WSHdelReg




'Windows Script Host Sample Script

L_Welcome_MsgBox_Message_Text= _
"This script demonstrates how To delete registry keys."
L_Welcome_MsgBox_Title_Text = _
"Windows Scripting Host Sample"
Call Welcome()
Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
Sub Welcome()
Dim intDoIt
intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text,_
vbOKCancel + vbInformation,_
L_Welcome_MsgBox_Title_Text )
If intDoIt = vbCancel Then
WScript.Quit
Else
WSHShell.Popup "Delete value HKCU\MyRegKey\Entry\Value1"
WSHShell.RegDelete "HKCU\MyRegKey\Entry\Value1"
WSHShell.Popup "Delete key HKCU\MyRegKey\Entry"
WSHShell.RegDelete "HKCU\MyRegKey\Entry\"
WSHShell.Popup "Delete key HKCU\MyRegKey"
WSHShell.RegDelete "HKCU\MyRegKey\"
End If
End Sub

Assumes:
Copy or Cut this Code and save
it as DELETEREGISTRY.TXT.VBS and then click
it inside your Windows Explorer to execute the program.











( wshdelreg.html )- by Paolo Puglisi - Modifica del 17/12/2023