C# Disable/Enable USB ports

前端 未结 2 1913
陌清茗
陌清茗 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:22

    make USBSTOR value to 4 and restart the PC. Another way is to disable in BIOS. Most of the computer manufacturers support this. But it will disable not only storage but all.

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题