Then here are steps to block usb ports. You can reenable whenever you want.
1. In search box search RUN. You can also press windows key + r.
2. Now, type regedit in it to open registry editor.
3. Once it browse to the follwoing location given in next step
5. In the right area, double click on Start.
6. In the Value Data box, change the value to 4.
7. Finally Click on OK.
8. Close Registry Editor and restart your PC.
9. To re-enable access to your USB ports, enter 3 in the Value Data box in Step 6.