diTii.com Digital News Hub

Sign up with your email address to be the first to know about latest news and more.

I agree to have my personal information transfered to MailChimp (more information)


USBVirusScan: Automatic virus scanning, when plug in USB Flash Drive

USBVirusScan will launch any program you provide as a command line parameter each time a USB stick is inserted. The author use it to start a full virus scan on the inserted USB drive, hence the name. For example, to start a cmd.exe on each USB drive you insert, you start USBVirusScan like this:

USBVirusScan cmd /k %d:

%d (or %c for legacy reasons) is a placeholder for the drive-letter of the inserted USB drive.

USBVirusScan uses a system tray icon and balloons to announce the insertion of a USB drive. If you want to hide this system tray icon, start USBVirusScan with option -i, like this:

USBVirusScan -i cmd /k %d:

You can also hide the command line console with option -c. This only works with Console applications, not with Windows applications. Option -e will disable the Exit command in the pop-up menu.

The -q switch will stop a running instance of USBVirusScan.

A new flag, -d, adds debugging support to USBVirusScan. When this flag is present, USBVirusScan will write debug output when drives are inserted. This debug output can be viewed with DebugView.

If you’re still unsure of how USBVirusScan works, you can see it in action at YouTube or download higher resolution version. The video will show that the batch file (start.bat) which contains the configuration is being launched first. Then a USB flash drive is connected. USBVirusScan detected the USB flash drive and immediately runs McAfee antivirus to scan the drive.

All you need is an antivirus program installed. Then you’ll need to find out the command line that can perform a scan. Once you have the command line, just edit the start.bat file. I know the command line part can be a bit confusing for computer beginners. So I’ve provided a few command line for some popular antivirus.

USBVirusScan.exe “C:\Program Files\Grisoft\AVG7\avgscan.exe

Share This Story, Choose Your Platform!

Get Latest News

Subscribe to Digital News Hub

Get our daily newsletter about the latest news in the industry.
First Name
Last Name
Email address
Secure and Spam free...