USB Virus Scan is a nice little command line utility that performs predefined operations if a usb drive is connected to your computer. It is able to distinguish between various drives which means that you can add custom operations for the drives that you own and a general option for drives that are not recognized. The tool uses the volume serial number of the drives to identify them and perform the operation.
Autorun from USB
It is not possible to autorun applications from an USB stick in windows unless you already have a program started that watches the usb ports. APO usb autorun suite makes it pretty easy to use autorun informations on usb drives. The tool checks wether a connected usb drive contains autorun information, if it does those are executed.

