Vbscript / Operating System / Enumerate Registry Keys
List the registry keys under a specified key.
Const HKEY_CLASSES_ROOT = &H80000000 Const HKEY_CURRENT_USER = &H80000001 Const HKEY_LOCAL_MACHINE = &H80000002 Const HKEY_USERS = &H80000003 Const HKEY_CURRENT_CONFIG = &H80000005
strComputer = "." Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\" & _ strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Applets"
objReg.EnumKey HKEY_CURRENT_USER, strKeyPath, arrSubKeys
For Each Subkey in arrSubKeys
Wscript.Echo Subkey
Next
Please note that a disclaimer applies to any code on this page.
|