方法一:
strHost = "."
Const HKLM = &H80000002
Set objReg = GetObject("winmgmts://" & strHost & _
"/root/default:StdRegProv")
Const strBaseKey = _
"Software\Microsoft\Windows\CurrentVersion\Uninstall\"
objReg.EnumKey HKLM, strBaseKey, arrSubKeys
For Each strSubKey In arrSubKeys
intRet = objReg.GetStringValue(HKLM, strBaseKey & strSubKey, _
"DisplayName", strValue)
If (strValue ="Vbsedit") and (intRet = 0) Then
WScript.Echo strValue
End If
Next
参考链接:
https://technet.microsoft.com/en-us/library/ee692772.aspx#EBAA