Preventing Explorer Window from Displaying when Pen Drive Inserted

  • Thread starter Thread starter Chad
  • Start date Start date
C

Chad

I am in the process of writing an application that detects the
insertion of a pen drive, and if a specific folder structure exists, it
shows a form containing data.

The problem is that when I insert the pen drive on some machines
running Windows XP, a windows explorer window appears containing the
contents of the pen drive. This window covers my application's window,
even if my application window opens a few seconds later.

How do I programmatically prevent this Explorer window from appearing?
Is there some Registry setting? Is it a specific setting for this
particular pen drive? I've tried playing around with the AutoPlay tab
in the properties dialog for that particular drive, and it doesn't seem
to help.

Thanks in advance for any help anyone can provide!
-Chad
 
After looking through the autoplay documentation you provided, it looks
like the problem I'm having isn't with autoplay.

I have manually set the autoplay info for my pen drive to "Take No
Action", for every file type. But when I plug in the pen drive, it
still opens the Windows Explorer folder list. There has to be
something else that is causing this to happen, since my autoplay
settings are set to take no action.
Has anybody had this problem before?

Thanks,
Chad
 
Back
Top