Вопрос:
Как с командной строки получить информацию о системе?
Ответ:
Программа Cmdinfo от SavillTech (http://www.savilltech.com/cmdinfo.html) предоставляет сведения о локальной или удаленной станции при запуске с командной строки. С помощью параметра команды можно также проверить то или иное конкретное значение (версию Service Pack, например) и установить в соответствие с полученным результатом переменную окружения %errorlevel%. Вот что выводит команда Cmdinfo в простейшем случае:
C:\>cmdinfo
Version Type Full Version
Installation Date 30 November 2001, 09:49:41
Expiry Date Not Applicable
OS Type Microsoft Windows XP
Product Type Windows XP Professional
Plus Version Not Available
IE Version Internet Explorer 6 (XP)
(6.0.2600.0000)
Service Pack Not available
Processor Type Multiprocessor Free
Activation Status Activated
Build Number 2600
Source Path F:\I386
System Root G:\WINDOWS
Owning Org SavillTech Ltd
Owner Name John Savill
Uptime 0 days, 3 hours,
49 minutes and 15 seconds
Hotfixes:
Application Compatibility Update
Windows XP Hotfix (SP1)
[See Q308381 for more information]
Q147222 No Description
Q282784 Windows XP Hotfix (SP1)
[See Q282784 for more information]
Q307869 Windows XP Hotfix (SP1)
[See Q307869 for more information]
Q308210 Windows XP Hotfix (SP1)
[See Q308210 for more information]
Q309521 Windows XP Hotfix (SP1)
[See Q309521 for more information]
Q309691 Windows XP Hotfix (SP1)
[See Q309691 for more information]
Q310437 Windows XP Hotfix (SP1)
[See Q310437 for more information]
Q310507 Windows XP Hotfix (SP1)
[See Q310507 for more information]
Q311889 Windows XP Hotfix (SP1)
[See Q311889 for more information]
Q313484 Windows XP Hotfix (SP1)
[See Q313484 for more information]
Q315000 Windows XP Hotfix (SP1)
[See Q315000 for more information]
В состав Windows XP включена утилита Systeminfo, которая выводит примерно то же самое плюс объем установленной памяти, сведения о сети и информацию о запущенных процессах. Но Systeminfo не отображает статус активации, тип установленной системы (т.е., Trial Limited, Full, Not For Resale - NFR) или сведения о Microsoft Internet Explorer (IE). Кроме того, Systeminfo дублирует некоторые записи об установленных заплатках. Набрав Systeminfo в командной строке, вы получите:
C:\>systeminfo
Host Name: CONAN
OS Name: Microsoft Windows XP Professional
OS Version: 5.1.2600 Build 2600
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: John Savill
Registered Organization: SavillTech Ltd
Product ID: 55274-005-0147286-22895
Original Install Date: 30/11/2001, 09:49:41
System Up Time: N/A
System Manufacturer: Compaq
System Model: Professional Workstation AP550
System type: X86-based PC
Processor(s): 2 Processor(s) Installed.
[01]: x86 Family 6 Model 8 Stepping 6
GenuineIntel ~863 Mhz
[02]: x86 Family 6 Model 8 Stepping 6
GenuineIntel ~863 Mhz
BIOS Version: COMPAQ - 20010410
Windows Directory: G:\WINDOWS
System Directory: G:\WINDOWS\System32
Boot Device: \Device\HarddiskVolume1
System Locale: en-gb;English (United Kingdom)
Input Locale: en-gb;English (United Kingdom)
Time Zone: (GMT)
Greenwich Mean Time :
Dublin, Edinburgh, Lisbon, London
Total Physical Memory: 512 MB
Available Physical Memory: 197 MB
Virtual Memory: Max Size: 994 MB
Virtual Memory: Available: 460 MB
Virtual Memory: In Use: 534 MB
Page File Location(s): N/A
Domain: FMMS
Logon Server: \\CONAN
Hotfix(s): 16 Hotfix(s) Installed.
[01]: File 1
[02]: Q147222
[03]: Q282784 - Windows XP Hotfix (SP1)
[See Q282784 for more information]
[04]: Q307869 - Windows XP Hotfix (SP1)
[See Q307869 for more information]
[05]: Q308210 - Windows XP Hotfix (SP1)
[See Q308210 for more information]
[06]: Q309521 - Windows XP Hotfix (SP1)
[See Q309521 for more information]
[07]: Q309691 - Windows XP Hotfix (SP1)
[See Q309691 for more information]
[08]: Q310437 - Windows XP Hotfix (SP1)
[See Q310437 for more information]
[09]: Q310507 - Windows XP Hotfix (SP1)
[See Q310507 for more information]
[10]: Q311889 - Windows XP Hotfix (SP1)
[See Q311889 for more information]
[11]: Q313484 - Windows XP Hotfix (SP1)
[See Q313484 for more information]
[12]: Q315000 - Windows XP Hotfix (SP1)
[See Q315000 for more information]
[13]: Q282784 - Update
[14]: Q311889 - Update
[15]: Q313484 - Update
[16]: Q315000 - Update
NetWork Card(s): 1 NIC(s) Installed.
[01]: Intel(R) 82559 Fast Ethernet LOM
with Alert on LAN*
Connection Name: Local Area Connection
DHCP Enabled: No
IP address(es)
[01]: 200.200.200.2
Джон Севилл - MCSE, консультант, автор книги «The Windows NT and Windows 2000 Answer Book» (Addison Wesley). С ним можно связаться по адресу: john@savilletech.com.