autorun a program when a USB drive is attached

F

FangQ

hi

I want to automatically run a program whenever a new USB drive is
attached to my system, is there a file or registry key to specify this
behavior? (note: this is like an autorun from the windows side, not on
the USB drive side)

if there is no such mechanism on windows, and I have to write my own
program to monitor this event, what message should my program listen
to?

thanks

Qianqian
 
S

smlunatick

hi

I want to automatically run a program whenever a new USB drive is
attached to my system, is there a file or registry key to specify this
behavior? (note: this is like an autorun from the windows side, not on
the USB drive side)

if there is no such mechanism on windows, and I have to write my own
program to monitor this event, what message should my program listen
to?

thanks

Qianqian

Usually, you need a autorun.inf in the main folder of the drive.
Seems to work with hard drives, CDs and DVDs
 
F

FangQ

I want this to be set on the windows side, which allows to run this
program no matter there is an autorun.inf on the USB drive or not.

more specifically, I want to start a virus scanning process when there
is a new USB drive plug in. Because the computer is running time-
critical tasks, so, I don't want the virus scanning software on all
the time.

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top