'Enumerate Registry Keys Recursively

Const HKEY_CLASSES_ROOT    = &H80000000
Const HKEY_CURRENT_USER    = &H80000001
Const HKEY_LOCAL_MACHINE    = &H80000002
Const HKEY_USERS            = &H80000003
Const HKEY_CURRENT_CONFIG    = &H80000005

strKeyPath = "SOFTWARE\Classes\VBSFile"

Set reg = GetObject("winmgmts://./root/default:StdRegProv")

EnumerateKeys HKEY_LOCAL_MACHINE, strKeyPath

Sub EnumerateKeys(hive, key)
  WScript.Echo key
  reg.EnumKey hive, key, arrSubKeys
  IfNot IsNull(arrSubKeys) Then
    ForEach subkeyIn arrSubKeys
      EnumerateKeys hive, key & "\" & subkey
    Next
  EndIf
EndSub
search for scripts

VbsEdit contains all these sample scripts!


Download Now!



Download   Home   Scripts

Copyright © 2001-2024 adersοft