![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-25 01:08 |
47,813 topics / 349,918 posts / today 1 new / 48,274 members |
| DOS批处理 & 脚本技术(批处理室) » Four Ways to Get System Software and Hardware Information from the Command Line |
| Printable Version 1,503 / 6 |
| Floor1 vkill | Posted 2007-04-10 03:10 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
|
systeminfo>>info.txt
start /wait msinfo32 /report info.txt psinfo -h -s -d >>info.txt devcon find * >>info.txt ****************************************** psinfo psinfo is a tool for collecting machine software and hardware information. It can obtain operating system information, hardware information, and software information. Its usage format is: psinfo [-h] [-s] [-d] [-c] [\\remote machine ip [-u username [-p password]]] Its parameters are: -u: followed by the username -p: followed by the password. If an ipc connection has already been established, these two parameters are not needed. (If there is no -p parameter, after entering the command it will ask you to enter the password) -h: displays which patch packages are installed -s: displays which software is installed -d: displays disk information. ****************************************** DevCon DevCon is a command-line utility with built-in documentation. If you run the devcon help command, the following command list and descriptions will appear. The devcon help command can provide detailed help about any command. With some of these commands, you can specify a remote target computer. If you use the 32-bit version of DevCon on WOW64, the following commands are valid. Device Console Help: devcon.exe [-r] [-m:\\<machine>] <command> [<arg>...] -r If specified, restart the computer after the command completes if needed. <machine> is the name of the target computer. <command> is the command to be executed (as shown below). <arg>... is one or more arguments required by the command. To get help about a particular command, type: devcon.exe help <command> classfilter allows modification of class filters. classes lists all device setup classes. disable disables devices matching the specified hardware or instance ID. driverfiles lists the driver files installed for devices. drivernodes lists all driver nodes of a device. enable enables devices matching the specified hardware or instance ID. find finds devices matching the specified hardware or instance ID. findall finds devices, including those not displayed. help displays this information. hwids lists the hardware IDs of devices. install manually installs a device. listclass lists all devices in a setup class. reboot restarts the local computer. remove removes devices matching a specific hardware or instance ID. rescan scans to discover new hardware. resources lists the hardware resources of devices. restart restarts devices matching a specific hardware or instance ID. stack lists the expected device driver stack. status lists the running status of devices. update manually updates a device. UpdateNI manually updates a device without user prompt SetHwID adds, deletes, and changes the order of hardware IDs for root-enumerated devices. DevCon command examples devcon -m:\\test find pci\* Lists all known PCI devices on computer test. (By using -m, you can specify a target computer. You must use interprocess communication (IPC) to access this computer.) devcon -r install %WINDIR%\Inf\Netloop.inf *MSLOOP Installs a new Microsoft loopback adapter instance. This creates a new root-enumerated device node, using which you can install "virtual devices" such as the loopback adapter. If a restart is required, this command will also restart the computer in quiet mode. devcon classes Lists all known setup classes. The output contains short non-localized names (for example, "USB") and descriptive names (for example, "Universal Serial Bus controllers"). devcon classfilter upper !filter1 !filter2 Removes these two specified filters. devcon classfilter lower !badfilter +goodfilter Replaces "badfilter" with "goodfilter". devcon driverfiles =ports Lists the files associated with each device in the ports setup class. devcon disable *MSLOOP Disables all devices whose hardware ID ends with "MSLOOP" (including "*MSLOOP"). devcon drivernodes @ROOT\PCI_HAL\PNP0A03 Lists all compatible drivers for device "ROOT\PCI_HAL\PNP0A03". This can be used to determine why the original device information (.inf) file was chosen instead of a third-party .inf file. devcon enable '*MSLOOP Enables all devices whose hardware ID is "*MSLOOP". The single quote indicates that the hardware ID must be interpreted literally (in other words, the asterisk ["*"] really is an asterisk, not a wildcard). devcon find * Lists the device instances of all devices present on the local computer. devcon find pci\* Lists all known "Peripheral Component Interconnect" (PCI) devices on the local computer (if a device's hardware ID is prefixed with "PCI\", this command considers the device to be a PCI device). devcon find =ports *pnp* Lists present devices that are members of the ports setup class and whose hardware IDs contain "PNP". devcon find =ports @root\* Lists present devices that are members of the ports setup class and are in the "root" branch of the enumeration tree (instance IDs prefixed with "root\"). Note that no programming assumptions should be made about how instance IDs are formatted. To determine root devices, you can check device status bits. This function is included in DevCon to help with debugging. devcon findall =ports Lists "non-present" devices and present devices in the ports class. This includes devices that have been removed, devices moved from one slot to another, and in some cases devices enumerated differently because of BIOS changes. devcon listclass usb 1394 Lists all present devices in each class listed in the command (USB and 1394 in this example). devcon remove @usb\* Removes all USB devices. When removed devices are listed, their removal status will be shown. devcon rescan Rescans to discover new Plug and Play devices. devcon resources =ports Lists the resources used by all devices in the ports setup class. devcon restart =net @'ROOT\*MSLOOP\0000 Restarts loopback adapter "ROOT\*MSLOOP\0000". The single quote in the command indicates that the instance ID must be interpreted literally. devcon hwids=mouse Lists all hardware IDs of mouse-class devices in the system. devcon sethwid @ROOT\LEGACY_BEEP\0000 := beep |
|
| Floor2 vkill | Posted 2007-04-10 03:10 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
| Floor3 ymbbmq | Posted 2007-04-10 03:21 |
| 新手上路 Posts 2 Credits 4 | |
|
Collecting this first
|
|
| Floor4 lxmxn | Posted 2007-04-10 03:46 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Saved it... Does the OP have to make a little chatter post even when posting a thread?? |
|
| Floor5 3391617 | Posted 2007-04-10 03:56 |
| 初级用户 Posts 56 Credits 116 | |
| Floor6 vkill | Posted 2007-04-10 09:27 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
Originally posted by lxmxn at 2007-4-10 03:46: Hehe, I wasn't chattering~ I was reserving space to post more stuff |
|
| Floor7 lxmxn | Posted 2007-04-10 13:01 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Oh, hehe, I misunderstood, sorry. |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |