Use of USB devices is sometimes the easiest way to get infected by a virus.
Perhaps you want to control the usage so that another user cannot copy something to an external device.
Learn, in this guide, how to protect yourself from attacks via a USB drive.
Please note: This guide involves use of the Group Policy Editor, which is not available on Home versions of Windows. Click to find out more about the Group Policy Editor.
Protect Yourself from USB Thumb Drive Attacks
Okay this is a solution for your problems:
Press WinKey + R, type gpedit.msc and press Enter.
Windows will then load the Local Group Policy Editor:
Go to Local Computer Policy, Computer Configuration, Administrative Templates, System, Device Installation and Device Installation Restriction.
Select Prevent installation of removable devices on the right pane:
Enable so no one can install an USB or other removable device and press Ok.
Now you are less vulnerable to USB thumb drive attacks.