C# Disable/Enable USB ports

前端 未结 2 1907
陌清茗
陌清茗 2021-01-28 01:55

I want to disable/enable all usb ports at once.
I tried the following:

Changed the registry (with admin privileges):

//disable USB storage...
Micros         


        
2条回答
  •  醉梦人生
    2021-01-28 02:34

    That registry key prevents the USBSTOR driver from loading. It won't unload it if it is already in use. So you will not see any effect until after reboot.

提交回复
热议问题