Re: Need script to delete a registry key

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Xander (Xander_at_bogusadress.com)
Date: 10/19/04


Date: Tue, 19 Oct 2004 11:18:28 +0200

How about this one:

Option Explicit

Const HKLM = &H80000002
Dim sComputer, oReg, sKeyPath

sComputer = "."
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
sComputer & "\root\default:StdRegProv")

sKeyPath = "Software\Classes\Mime\Database\Content Type\Application/HTA"

oReg.DeleteKey HKLM, sKeyPath

MsgBox "Done!"

"Ray" <ray.rayz@verizon.net> schreef in bericht
news:mmYcd.2569$7d7.868@trnddc04...
> I need a script to delete the following registry entry:
>
> The location is
> Hkey_Local_Machine\Software\Classes\Mime\Database\Content Type. I need
> to delete the Application/HTA key
>
> Any help would be greatly appreciated
>
> Ray