断开连接+连接(重新加载)接口 USB

断开连接+连接(重新加载)接口 USB

我在 KVM 和 Windows 10 上遇到了一个众所周知的问题123。当我将 KVM 切换到这台 Win10 机器时,USB 接口无法识别插入 KVM 的设备,因此我必须手动拔下并插入 USB 电缆才能使其按预期工作。

我想使这个过程自动化。(欢迎提出建议)。

我考虑过开一个.ahk脚本将调用类似普蒂尔斯。我认为这里正确的语法是interface而不是device,因为出于上述原因,不会有设备连接。pnp 调用enable-devicedisable-device,但没有调用接口 ):

我在连接和未连接上述 USB 电缆的情况下运行过pnputils /enum-interfaces /enabled,日志之间的差异如下:

Instance ID:                    
Device Description:         Generic USB Hub 
Class Name:                 USB 
Class GUID:                 {36fc9e60-c465-11cf-8056-444553540000}  
Manufacturer Name:          (Standard USB HUBs) 
Status:                     Started 
Driver Name:                usbhub3.inf

Instance ID:                USB\VID_046D&PID_C53F\6&55a180b&0&3 
Device Description:         USB Composite Device    
Class Name:                 USB 
Class GUID:                 {36fc9e60-c465-11cf-8056-444553540000}  
Manufacturer Name:          (Standard USB Host Controller)  
Status:                     Started 
Driver Name:                usb.inf

Instance ID:                USB\VID_046D&PID_C228\7&2aaff80b&0&1    
Device Description:         USB Composite Device    
Class Name:                 USB 
Class GUID:                 {36fc9e60-c465-11cf-8056-444553540000}  
Manufacturer Name:          (Standard USB Host Controller)  
Status:                     Started 
Driver Name:                usb.inf 

Instance ID:                USB\VID_05E3&PID_0608\5&326c0cbc&0&1    
Device Description:         Generic USB Hub 
Class Name:                 USB 
Class GUID:                 {36fc9e60-c465-11cf-8056-444553540000}  
Manufacturer Name:          (Standard USB HUBs) 
Status:                     Started 
Driver Name:                usbhub3.inf

Instance ID:                USB\VID_1235&PID_8202\6&55a180b&0&2 
Device Description:         USB Composite Device    
Class Name:                 USB 
Class GUID:                 {36fc9e60-c465-11cf-8056-444553540000}  
Manufacturer Name:          (Standard USB Host Controller)  
Status:                     Started 
Driver Name:                usb.inf

Instance ID:                USB\VID_046D&PID_C229\7&2aaff80b&0&2    
Device Description:         USB Composite Device    
Class Name:                 USB 
Class GUID:                 {36fc9e60-c465-11cf-8056-444553540000}  
Manufacturer Name:          (Standard USB Host Controller)  
Status:                     Started 
Driver Name:                usb.inf

有什么办法可以实现我的愿望吗?也许可以重新加载 USB 驱动程序(usbhub3.inf)?

相关内容