<分区>
Possible Duplicate:
A vbscript to find windows version name and the service pack
我的问题说明了一切。
谢谢。
<分区>
Possible Duplicate:
A vbscript to find windows version name and the service pack
我的问题说明了一切。
谢谢。
最佳答案
这是另一个版本:
Set dtmConvertedDate = CreateObject("WbemScripting.SWbemDateTime")
strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set oss = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")
For Each os in oss
Wscript.Echo "Boot Device: " & os.BootDevice
Wscript.Echo "Build Number: " & os.BuildNumber
Wscript.Echo "Build Type: " & os.BuildType
Wscript.Echo "Caption: " & os.Caption
Wscript.Echo "Code Set: " & os.CodeSet
Wscript.Echo "Country Code: " & os.CountryCode
Wscript.Echo "Debug: " & os.Debug
Wscript.Echo "Encryption Level: " & os.EncryptionLevel
dtmConvertedDate.Value = os.InstallDate
dtmInstallDate = dtmConvertedDate.GetVarDate
Wscript.Echo "Install Date: " & dtmInstallDate
Wscript.Echo "Licensed Users: " & os.NumberOfLicensedUsers
Wscript.Echo "Organization: " & os.Organization
Wscript.Echo "OS Language: " & os.OSLanguage
Wscript.Echo "OS Product Suite: " & os.OSProductSuite
Wscript.Echo "OS Type: " & os.OSType
Wscript.Echo "Primary: " & os.Primary
Wscript.Echo "Registered User: " & os.RegisteredUser
Wscript.Echo "Serial Number: " & os.SerialNumber
Wscript.Echo "Version: " & os.Version
Next
结果:
Microsoft Windows XP Professional
Version: 5.1.2600
关于windows - 如何从 VB 脚本确定 Windows 版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4542284/