0

Is there a way to provide a call to a user-defined program after a plug-and-play flash drive has been inserted and detected by Windows?

Ben Voigt
  • 277,958
  • 43
  • 419
  • 720
ron tornambe
  • 10,452
  • 7
  • 33
  • 60

1 Answers1

0

No, Microsoft finally figured out that autorun programs are a huge security risk, and no longer will start an application when a drive is inserted.

However, an application that's already installed and running can be notified when a drive is inserted. Is that sufficient? Look up WM_DEVICECHANGE and specifically the DBT_DEVICEARRIVAL w/DBT_DEVTYP_VOLUME case.

Ben Voigt
  • 277,958
  • 43
  • 419
  • 720