VBS 使用WMI检查本机是否安装了.NET Framework | 雨律在线
'WMI检查本机是否安装了.NET Framework
Public Function IsMSFrameworkInstalled() As Boolean
On Error Resume Next
Dim
objWMIService
Dim colItems
Dim objItem
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Product")
For Each objItem In colItems
If InStr(objItem.Name, "Microsoft .NET Framework") > 0 Then
IsMSFrameworkInstalled = True
End If
Next
End Function


调用:
MsgBox IsMSFrameworkInstalled()

 
目前有0条回应
Comment
Trackback
你目前的身份是游客,请输入昵称和电邮!