const HKEY_LOCAL_MACHINE = &H80000002
const REG_SZ = 1
const REG_EXPAND_SZ = 2
const REG_BINARY = 3
const REG_DWORD = 4
const REG_MULTI_SZ = 7
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate"
oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath,arrValueNames, arrValueTypes
For i=0 To UBound(arrValueNames)
if instr(arrValueNames(i),"SusClientId") then
'Msgbox(arrValueNames(i))
oReg.DeleteValue HKEY_LOCAL_MACHINE, strKeyPath, arrValueNames(i)
end if
Next
|