Lock USB ports, but keyboard and mouse in USB.

Borneo67 Posted messages 2 Status Member -  
brucine Posted messages 25275 Registration date   Status Member Last intervention   -

Hello,

I want to lock the USB ports of my PC during an absence of a few days. I have seen several solutions for this (modifying the registry, device manager). But my keyboard and mouse are connected to USB ports. So how will I be able to unlock the USB ports without using my keyboard and mouse after my return? Thank you for your solution, my PC is running Windows 10.

Borneo67.


2 answers

  1. steph810 Posted messages 1865 Registration date   Status Member Last intervention   152
     

    You need to lock everything down by specifying an exception for your keyboard and mouse with their UID and GUID.

    0
  2. Borneo67 Posted messages 2 Status Member
     

    Hello Steph810,

    Glad to know there is a solution, thank you. To specify an exception, should I lock it through regedit or through the device manager, how do I find the UIDs and GUIDs? Thank you and have a good day.

    0
    1. brucine Posted messages 25275 Registration date   Status Member Last intervention   4 187
       

      Hello,

      If we block all USB ports, we indeed find ourselves at a standstill; if we keep the ones for the keyboard and mouse active, nothing prevents a user from plugging in something else unless we specifically specify the type of device allowed.

      The approach of positively identifying the mouse and keyboard ID in the registry (and thus negating the rest) is complicated.

      It's better to modify the registry through a local security policy, but you need Windows 10 Pro or to activate this policy using a suitable utility like Policy Plus Latest: https://github.com/Fleex255/PolicyPlus

      https://www.it-connect.fr/comment-bloquer-les-cles-usb-par-gpo/

      1