VB script to remove registry Keys

If you want to remove the registry key from local machine from windows 32 Bit OS (it will also remove the values residing in the key),try the below script as adminstrator (RUN AS).

If you are using any deployment tool like Configmgr ,create a folder and place this script inside it  and create a package by mapping the source as this folder and program command line as scriptname ,Run with administrative rights .

Script to remove the reg key:

const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\PLAP Providers\{11660363-8F14-CA1D-BB17-814630A2009F}"
oReg.DeleteKey HKEY_LOCAL_MACHINE, strKeyPath

Change the value which is in Bold,you can add multiple keys at one go here.

 Reference http://social.technet.microsoft.com/Forums/en-US/configmgrswdist/thread/1c9db33b-69be-4060-a4e6-1df710aedb0a

Leave a Reply