• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 551
  • Last Modified:

Delete Registry Key using VBS script

I have been trying to delete the following registry key:

I have written the following script:
const HKEY_CLASSES_ROOT = &H80000000
strComputer = "."
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "CLSID\{FBBFF378-921E-4504-972A-66193574213D}"
objReg.DeleteKey HKEY_CLASSES_ROOT, strKeyPath

It is not working, but does not throw any errors.  Any ideas?
1 Solution
Laramie1Author Commented:
Found the solution at 

The registry key I was trying to remove had subkeys with must be removed first.  The code mentioned in this article worked great.

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now