Link to home
Create AccountLog in
Avatar of DMTechGrooup
DMTechGrooupFlag for United States of America

asked on

VBS - If registry key exisits then delete it

I need the following in a VBS file that if the key exists then delete it or move on.

Thanks.
' Delete Reg Key
 
 
Set WshShell = WScript.CreateObject("WScript.Shell")
key1 = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PDRFRAME"
WshShell.RegDelete key1 & "\"

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of DMTechGrooup

ASKER

Fast and accurate with information.  Thanks.