无忧启动论坛

标题: 【求助】怎样获取“设备管理器”信息列表?谢谢 [打印本页]

作者: yyz2191958    时间: 2023-6-24 12:23
标题: 【求助】怎样获取“设备管理器”信息列表?谢谢
本帖最后由 yyz2191958 于 2023-6-24 12:42 编辑

怎样获取“设备管理器”信息列表——并且保存为:#.txt
(bat vbs wcs ahk 第三方 都行)

作者: chishingchan    时间: 2023-6-24 13:44
不妨研究一下 devcon.exe 的参数
  1. Device Console Help:

  2. devcon [-r] [-m:\\<machine>] <command> [<arg>...]

  3. -r           Reboots the system only when a restart or reboot is required.

  4. <machine>    Specifies a remote computer.

  5. <command>    Specifies a Devcon command (see command list below).

  6. <arg>...     One or more arguments that modify a command.

  7. For help with a specific command, type: devcon_x64 help <command>
  8. classfilter          Add, delete, and reorder class filters.

  9. classes              List all device setup classes.

  10. disable              Disable devices.

  11. driverfiles          List installed driver files for devices.

  12. drivernodes          List driver nodes of devices.

  13. enable               Enable devices.

  14. find                 Find devices.

  15. findall              Find devices, including those that are not currently attached.

  16. help                 Display Devcon help.

  17. hwids                List hardware IDs of devices.

  18. install              Install a device manually.

  19. listclass            List all devices in a setup class.

  20. reboot               Reboot the local computer.

  21. remove               Remove devices.

  22. rescan               Scan for new hardware.

  23. resources            List hardware resources for devices.

  24. restart              Restart devices.

  25. sethwid              Modify Hardware ID's of listed root-enumerated devices.

  26. stack                List expected driver stack for devices.

  27. status               List running status of devices.

  28. update               Update a device manually.

  29. updateni             Manually update a device (non interactive).

  30. dp_add               Adds (installs) a third-party (OEM) driver package.

  31. dp_delete            Deletes a third-party (OEM) driver package.

  32. dp_enum              Lists the third-party (OEM) driver packages installed on this machine.
复制代码

作者: yyz2191958    时间: 2023-6-24 13:47
chishingchan 发表于 2023-6-24 13:44
不妨研究一下 devcon.exe 的参数

谢谢
作者: yyz2191958    时间: 2023-6-24 13:48
chishingchan 发表于 2023-6-24 13:44
不妨研究一下 devcon.exe 的参数

我看不懂英文哦
作者: batche    时间: 2023-6-24 14:18
本帖最后由 batche 于 2023-6-24 14:20 编辑

powershell可不可以
powershell -c "Get-PnpDevice |?{$_.Class -ne 'Volume' -and $_.ConfigManagerErrorCode -ne 45}| Group-Object -Property Class |ForEach{ Write-Host \"设备类别:$($_.Name)\" ; $_.Group|ForEach{Write-Host \"  $($_.Name)\"}}" >device_list.txt
作者: szwp    时间: 2023-6-24 14:45
wmic path Win32_PnPSignedDriver>1.txt
作者: yyz2191958    时间: 2023-6-24 22:35
szwp 发表于 2023-6-24 14:45
wmic path Win32_PnPSignedDriver>1.txt

'wmic' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

作者: yyz2191958    时间: 2023-6-24 22:37
batche 发表于 2023-6-24 14:18
powershell可不可以
powershell -c "Get-PnpDevice |?{$_.Class -ne 'Volume' -and $_.ConfigManagerError ...

是不是批处理?没有成功
作者: NMR    时间: 2023-6-24 22:48
学习学习         
作者: 泮安宁    时间: 2023-6-25 03:58
yyz2191958 发表于 2023-6-24 22:35
'wmic' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

你pe没有wmic组件
作者: 泮安宁    时间: 2023-6-25 03:58
yyz2191958 发表于 2023-6-24 22:37
是不是批处理?没有成功

别人不是都说了是powershell吗
作者: yyz2191958    时间: 2023-6-25 07:25
yyz2191958 发表于 2023-6-24 22:35
'wmic' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

从C盘复制一个过来,已经不提示,但是1.txt是空的
作者: yyz2191958    时间: 2023-6-25 07:25
泮安宁 发表于 2023-6-25 03:58
别人不是都说了是powershell吗

没有这个东西
作者: szwp    时间: 2023-6-25 08:17
yyz2191958 发表于 2023-6-24 22:35
'wmic' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

去原版系统先练习。




欢迎光临 无忧启动论坛 (http://wuyou.net/) Powered by Discuz! X3.3