You will have to disable autoplay/autorun from your harddisk as well as usb drive, to do so.. ..open command prompt and type in the following
'X:' press enter (X=drive letter)
now type 'del autorun.* /f /s /q'
Do this for all drives, so also the usb drive and then you may scan it with an anti-virus...

Thanks for you reply and suggestions. Not all the people follow the rules. Even if i disable autorun, users can still open USBs without scanning them with antivirus. That's why i need to automate the scanning process. When a user insert a usb, the antivirus program should lock it for scanning then scan it and delete any file found infected. Then it should allow user to open it.

Is it possible for an Antivirus program to automatically block and start scanning USB Flash Drive, CD or Floppy when they are inserted in the computer and then allow users to open it?

It sure is. Quite a few different AV vendors offer this type of capability. I know that McAfee for instance allows you to block usb storage devices either completely or over a certain size, prevent copying files to them, encrypt any files that are passed to the device, encrypt the entire device if you so wish and many other things.

As a more general rule though, I would suggest an AV rule that scans on file access (often refered to as "on access scan"). whilst it won't scan the drive in its entirety it will scan any file prior to it being run which may suit your situation better.

Thanks for you reply and suggestions. Not all the people follow the rules. Even if i disable autorun, users can still open USBs without scanning them with antivirus. That's why i need to automate the scanning process. When a user insert a usb, the antivirus program should lock it for scanning then scan it and delete any file found infected. Then it should allow user to open it.

Thanks!

Using Antivirus can remove autorun.inf , such as nod32 or kaspersky ,but If you want to disable usb only

There is some security option while connecting any flash drive with your computer. You can block such type of connection.

My post might be late, but I remember that there is an option to disable autorun of the drives. It is simple: just hold down the shift key while inserting the flash drives. That is all!
Also, if anyone wants to scan the usb drives while inserting them to the usb port, he or she must enable the option of the antivirus to scan automatically the drives. For example, AVG has that usefull option.