第一种 通过wshshell对象的regread
复制代码代码如下:
RegValue = CreateObject("Wscript.Shell").RegRead("/XXXX_XXXXXXXX_XXX/XXX/XXXX")
Msgbox(RegValue)
第二种方法: 通过wmi
复制代码代码如下:
Const HKLM = &H80000002
strPath = "SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/Desktop/NameSpace"
Set oReg = GetObject("Winmgmts:/root/default:StdRegProv")
oReg.EnumKey HKLM,strPath,arr
For Each x In arr
WScript.Echo x
Next