请问使用VBS调用WMI获取当前系统版本(不是版本号,是类似 Windows 7 专业版 这种字符串)要如何做?
发布网友
发布时间:2022-04-25 07:53
我来回答
共1个回答
热心网友
时间:2022-04-25 09:22
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!//" & strComputer & "/root/cimv2")
Set colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
For Each objOperatingSystem In colOperatingSystems
MsgBox objOperatingSystem.Caption
MsgBox objOperatingSystem.Version
Next