如何使用批处理文件捕获 Windows 硬件配置?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4744140/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I capture Windows hardware configuration using a batch file?
提问by Rock with IT
How can I capture the hardware configuration using batch file?
如何使用批处理文件捕获硬件配置?
And also want to know the Registry location where hardware configuration information is stored.
并且还想知道存储硬件配置信息的注册表位置。
Can anyone help?
任何人都可以帮忙吗?
回答by Patrick Cuff
You can run the systeminfo
command and redirect the output to a file:
您可以运行该systeminfo
命令并将输出重定向到一个文件:
systeminfo > %computername%-systeminfo.txt.
systeminfo
can also be run on a remote system, and there are several different output formats you can use:
systeminfo
也可以在远程系统上运行,您可以使用多种不同的输出格式:
SYSTEMINFO [/S system [/U username [/P [password]]]] [/FO format] [/NH]
Description:
This command line tool enables an administrator to query for basic
system configuration information.
Parameter List:
/S system Specifies the remote system to connect to.
/U [domain\]user Specifies the user context under which
the command should execute.
/P [password] Specifies the password for the given
user context. Prompts for input if omitted.
/FO format Specifies the format in which the output
is to be displayed.
Valid values: "TABLE", "LIST", "CSV".
/NH Specifies that the "Column Header" should
not be displayed in the output.
Valid only for "TABLE" and "CSV" formats.
/? Displays this help/usage.
Examples:
SYSTEMINFO
SYSTEMINFO /?
SYSTEMINFO /S system
SYSTEMINFO /S system /U user
SYSTEMINFO /S system /U domain\user /P password /FO TABLE
SYSTEMINFO /S system /FO LIST
SYSTEMINFO /S system /FO CSV /NH