PC Review


Reply
Thread Tools Rate Thread

autorun a program when a USB drive is attached

 
 
FangQ
Guest
Posts: n/a
 
      22nd Jan 2008
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
 
Reply With Quote
 
 
 
 
smlunatick
Guest
Posts: n/a
 
      22nd Jan 2008
On Jan 22, 4:05*pm, FangQ <fan...@gmail.com> wrote:
> 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
 
Reply With Quote
 
FangQ
Guest
Posts: n/a
 
      23rd Jan 2008
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

On Jan 22, 4:39 pm, smlunatick <yves...@gmail.com> wrote:
> Usually, you need a autorun.inf in the main folder of the drive.
> Seems to work with hard drives, CDs and DVDs


 
Reply With Quote
 
Christian ASTOR
Guest
Posts: n/a
 
      23rd Jan 2008
On 22 jan, 22:05, FangQ <fan...@gmail.com> wrote:

> I want to automatically run a program whenever a new USB drive is
> attached to my system


RegisterDeviceNotification()
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoRun program =?Utf-8?B?TWljaGFlbA==?= Windows XP Help 1 24th Oct 2007 10:38 PM
autorun program when USB inserted, possible? Mike Scirocco Windows XP General 3 22nd Feb 2007 03:29 AM
autorun when program closes? johnnyzero Freeware 5 24th Feb 2006 05:18 PM
Writing a autorun program =?Utf-8?B?SmFpbWUgQ29sZQ==?= Microsoft Access VBA Modules 1 16th Jun 2005 11:34 PM
How do I NOT use autorun to install a program ikroc Windows XP General 2 13th Apr 2004 01:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:50 AM.