This will get you started. ![[sleeping2] [sleeping2] [sleeping2]](/data/assets/smilies/sleeping2.gif)
What can I say I got bored. Hopefully you don't need a binary or Multistring value.
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
const REG_SZ = 1
const REG_EXPAND_SZ = 2
const REG_BINARY = 3
const REG_DWORD = 4
const REG_MULTI_SZ = 7
strOriginalKeyPath = "SYSTEM\CurrentControlSet\Control\Class"
FindKeyValue(strOriginalKeyPath)
'-------------------------------------------------------------------------
Function FindKeyValue(strKeyPath)
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
errorCheck = oReg.EnumKey(HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys)
If (errorCheck=0 and IsArray(arrSubKeys)) then
For Each subkey In arrSubKeys
Wscript.Echo subkey
strNewKeyPath = strKeyPath & "\" & subkey
FindKeyValue(strNewKeyPath)
Next
End If
oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath, _
arrValueNames, arrValueTypes
If (errorCheck=0 and IsArray(arrValueNames)) then
For i=0 To UBound(arrValueNames)
Wscript.Echo "Value Name: " & arrValueNames(i)
strValueName = arrValueNames(i)
Select Case arrValueTypes(i)
Case REG_SZ
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
wscript.echo "Value: " & strvalue
Case REG_EXPAND_SZ
oReg.GetExpandedStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strEXValue
wscript.echo "Value: " & strExvalue
Case REG_BINARY
oReg.GetBinaryValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,binaryValue
wscript.echo "Value: Binary"
Case REG_DWORD
oReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
wscript.echo "Value: " & dwvalue
Case REG_MULTI_SZ
oReg.GetMultiStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,MulstrValue
wscript.echo "Value: MultiString"
End Select
Next
End if
end Function