我想看到与vbs,注册表路径。我有办法读取密钥。
Set wshShell = CreateObject( "WScript.Shell" )
WScript.Echo "ID = " _
& wshShell.RegRead( "HKEY_USERSkey" )
输出是注册表键值字符串。
我想脚本,其中显示所有路径在HKEY_USERS.
示例树:
HKEY_USERS
S-1-5-20_Classes
S-1-5-20
S-1-5-21
S-1-5-21-15325-362362362 (I want to output only this path)
您可以使用WMI StdRegProv.EnumKey
方法列出特定注册表项下的所有子键。例如:
Const HKEY_USERS = &H80000003
strComputer = "."
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\" _
& strComputer & "rootdefault:StdRegProv")
strKeyPath = ""
objReg.EnumKey HKEY_USERS, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
WScript.Echo subkey
Next