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