首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用devcon.exe移除USB

使用devcon.exe移除USB
EN

Stack Overflow用户
提问于 2012-05-10 21:26:01
回答 1查看 2.3K关注 0票数 2

是否可以使用devon.exe按名称删除U盘大容量存储设备?以下代码用于删除所有设备:

代码语言:javascript
复制
Devcon remove usbstor\*

但现在我想删除一个特定的设备。例如,如果插入了5个USB:ABCDEF,我现在只想删除B。我知道实例id用于此目的,但是否可以使用设备名称删除?例如,像这样

代码语言:javascript
复制
Devcon remove usbstor\B

我试过了,但不起作用。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-07-31 21:45:41

您可以通过硬件ID删除单个设备。如果您知道id,则可以使用remove命令,否则您必须找到硬件id。有关详细信息,请参阅帮助:

代码语言:javascript
复制
Devcon Remove Command
Removes devices with the specified hardware or instance ID. Valid only on
the local computer. (To reboot when necesary, Include -r .)
Devcon.exe [-r] remove <id> [<id>...]
Devcon.exe [-r] remove =<class> [<id>...]
<class>      Specifies a device setup class.
Examples of <id>:
 *              - All devices
 ISAPNP\PNP0501 - Hardware ID
 *PNP*          - Hardware ID with wildcards  (* matches anything)
 @ISAPNP\*\*    - Instance ID with wildcards  (@ prefixes instance ID)
 '*PNP0501      - Hardware ID with apostrophe (' prefixes literal match - matches exactly as typed,
                                               including the asterisk.)
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10534983

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档