If you're concerned about someone plugging their USB stick into your PC, knowing that these are a potentially dangerous means of spreading viruses, then try disable USB ports temporarily with USB Disabler.
Also, if what you need is protect your pendrive, you can control its access by modifying its attributes, thus preventing malicious files from being copied; malware in general.
Well, both the one and the other, USB Disabler is capable of doing it. For the first case, the program must be run from the computer and for the second from the root of the USB memory. Then we choose between the three protection options: Normal, Read Only y Disabled. Finally with a click on save, indicated by a floppy disk icon, the protection will be carried out.
USB Disabler is a free application portable, 867 KB (Zip), compatible with Windows 7 / Vista / XP.
Link: Download USB Disabler
Related programs: