Systeminfo - DOS/Command Prompt Reference
[Windows NT series] Displays the system information of the computer on the screen.
Syntax
systeminfo[.exe] [/S <remote-system> [/U <user-name> [/P [<password>]]]] [/FO <output-format>] [/NH]
Options
/S <remote-system> | Specifies the name of the computer (local/remote) from which to retrieve system information. <remote-system> will be an IP address or hostname. If omitted, the local computer will be the target. | ||||||||
/U <user-name> [/P [<password>]] |
Specifies the login name and password when providing a computer name. You can include a domain name in <user-name> (in the format ‘domain\username’). If omitted, the user who executes this command will be used. Password specification works as follows:
|
||||||||
/FO <output-format> |
Specifies the format for output on the screen. Three possible values can be specified. If /FO is omitted, the format defaults to ‘LIST’.
|
||||||||
/NH | Suppresses headers when displaying in TABLE or CSV format. |
Details
The Systeminfo program reads various system information at runtime and outputs the results. Depending on the computer's state, the reading process may take several seconds.
Note that the order of items output in TABLE or CSV format does not change with each execution, but it may vary depending on factors such as the operating system version.
Samples
Sample (Batch file)
@echo off for /f "tokens=1,* delims=:" %%A in ('systeminfo') do if "%%A"=="BIOS Version" call :UseBIOSVersion %%B exit /b :UseBIOSVersion set "BIOS_VERSION=%*" exit /b
[Extensions] The content of ‘BIOS Version’ from system information will be set to the environment variable ‘BIOS_VERSION’. In this example, LIST format output is parsed using the For command. This approach is taken because there is a possibility of commas in the output before ‘BIOS Version’, making CSV parsing with the For command cumbersome. Additionally, the usage of the Call command is employed for the purpose of removing multiple space characters between ‘:’ and the item content in ‘BIOS Version: XXXXXX’.