首页 > Windows开发 > 详细

cmd命令行查看windows版本

时间:2014-04-16 19:17:45      阅读:875      评论:0      收藏:0      [点我收藏+]

1.ver命令不显示sp几
C:\>ver
Microsoft Windows XP [Version 5.1.2600]
C:\>
08:
C:\Users\Administrator>ver
Microsoft Windows [版本 6.1.7601]


2.systeminfo | findstr /B /C:"OS Name" /C:"OS Version"  , 在XP, Vista and Windows 7 and on Server editions 运行没问题.
C:\>systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
Microsoft Windows XP Professional
OS Version:                5.1.2600 Service Pack 2 Build 2600

   more details:
   C:\>systeminfo | findstr /C:"OS"


3.wmic os get Caption,CSDVersion /value
c:\>wmic os get Caption,CSDVersion /value
Caption=Microsoft Windows 7 Enterprise
CSDVersion=Service Pack 1


4.wmic os get buildnumber,caption,CSDVersion /format:csv


5.winver弹框出来,豆比了。


6 WMIC /node:RemoteComputerName os get buildnumber,caption,CSDVersion /format:csv
  可利用此来探测远程主机版本

7.vb
strComputer = “localhost”
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\\” _
& strComputer & “\root\cimv2″)
Set colOSes = objWMIService.ExecQuery(“Select * from Win32_OperatingSystem”)
For Each objOS in colOSes
Wscript.Echo “Version: ” & objOS.Version ‘Version & build
Wscript.Echo “OS Type: ” & objOS.OSType
Next


8.bat
echo ****************************************
echo YOUR PC’S MAKE AND MODEL
echo ****************************************
echo.
wmic computersystem get manufacturer
wmic csproduct get Name
wmic os get caption
wmic computersystem get systemtype
wmic bios get serialnumber
echo.
echo ****************************************
echo.
ECHO TAKE NOTE OF THE ABOVE INFO.
Echo.
Pause

 

 

systeminfo | find "System Type:"

 

net config workstation

cmd命令行查看windows版本,布布扣,bubuko.com

cmd命令行查看windows版本

原文:http://www.cnblogs.com/hookjoy/p/3668868.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!