'-- Script To Delete Registry Key From All User Profiles in Windows XP
On Error Resume Next
Const HKEY_USERS = &H80000003
strComputer = "."
strKeyPath = ""
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKey="Software\Microsoft\Active Setup\Installed Components\{22d6f312-b0f6-11d0-94ab-0080c74c7e95}"
DeleteSubkeys HKEY_USERS, strKeypath
strKey="Software\Microsoft\Active Setup\Installed Components\{44BBA842-CC51-11CF-AAFA-00AA00B6015B}"
DeleteSubkeys HKEY_USERS, strKeypath
Sub DeleteSubkeys(HKEY_USERS, strKeyPath)
objRegistry.EnumKey HKEY_USERS, strKeyPath, arrSubkeys
If IsArray(arrSubkeys) Then
For Each strSubkey In arrSubkeys
DeleteSubkeys HKEY_USERS, strKeyPath & strSubkey & "\" & strKey
objRegistry.DeleteKey HKEY_USERS, strKeyPath & strSubkey & "\" & strKey
Next
End If
objRegistry.DeleteKey HKEY_USERS, strKeyPath & strSubkey & "\" & strKey
End Sub
Comments