Note: If you are using USB mouse or USB keyboard then this will disable them also. So If you are using any of the USB connected devices then this will disable them also.
How to Disable USB ports :
2. Type Regedit and hit enter. It will launch a Registry editor.
3. Now simply navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesusbstor.
4. Double Click on Start and in the Value data box enter 4 and click on Ok.
6. If you want to re-enable the USB ports then enter 3 in the Value Data box in step 5.
This will make your PC invulnerable from data theft and malware which usually spread from the USB ports. This works on Windows XP, Windows 7 and Wndows 8.