【vbs】查询客户端上的应用程序

方法一:

strHost = "."
Const HKLM = &H80000002
Set objReg = GetObject("winmgmts://" & strHost & _
    "/root/default:StdRegProv")
Const strBaseKey = _
    "Software\Microsoft\Windows\CurrentVersion\Uninstall\"
objReg.EnumKey HKLM, strBaseKey, arrSubKeys

ForEach strSubKey In arrSubKeys
    intRet = objReg.GetStringValue(HKLM, strBaseKey & strSubKey, _
        "DisplayName", strValue)
        
    If (strValue ="Vbsedit") and (intRet = 0) Then
        WScript.Echo strValue
    EndIf
Next

参考链接:

https://technet.microsoft.com/en-us/library/ee692772.aspx#EBAA

posted @ 2018-08-29 19:15  Daniel_Dai  阅读(218)  评论(0编辑  收藏  举报