如何使用批处理文件捕获Windows硬件配置?

时间:2011-01-20 06:33:43

标签: windows batch-file windows-xp registry

如何使用批处理文件捕获硬件配置?

并且还想知道存储硬件配置信息的注册表位置。

有人可以帮忙吗?

1 个答案:

答案 0 :(得分:4)

您可以运行systeminfo命令并将输出重定向到文件:

systeminfo > %computername%-systeminfo.txt.

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