title: How to prevent autoplay and run my own app when inserting an USB-Flash drive
body: <p>when inserting an USB-Flash drive, Windows normally opens the Autoplay dialog that offers to browse the drive or if there are multimedia files it offers to choose an app to open them.</p>
  <p>We developed a media player that is connected to the USB-Drive and registers itself as Mass Storage Device.</p>
  <p>What I need is, that when inserting the Player that this Dialog is not shown, but instead my own application is launched.</p>
  <p>Ideally the application would be on the Flash Drive itself, but as I understood is that Autorun is disabled for USB-Drives.</p>
  <p>It would be enough if a preinstalled application is launched. I already tried to catch the WM_DRIVE_CHANGE message, but this only works if my application is the top most window, otherwise the Autoplay Dialog is displayed.</p>