开发者

A vbscript to find windows version name and the service pack

开发者 https://www.devze.com 2023-01-27 10:57 出处:网络
What\'s the simplest way to find out which version of Windows, and which service pack, is running on a computer with VBScript?

What's the simplest way to find out which version of Windows, and which service pack, is running on a computer with VBScript?

For example I'd want to know Windows XP and Servic开发者_JS百科e Pack 3.


An easy way of doing this is to use the WMI class Win32_OperatingSystem which has the properties ServicePackMajorVersion, ServicePackMinorVersion, Name and Version. You can find samples here: WMI Tasks: Operating Systems

The data you get back might not be in the exact format that you want though so you might need to have some kind of lookup table to make it look exactly right.

0

精彩评论

暂无评论...
验证码 换一张
取 消