Disable USB action prompt

oferz used Ask the Experts™
Hello experts,

I developed a VB.Net application for a stand alone PC with XP OS, this PC was design to execute this application only.
Users plug in a disk on key / any mp3 player and the application lets the user to download mp3 tutorials to their players.
The application was developed as a KIOSK, no keyboard is connected, the hotkeys are disabled, taskbar hidden,I'm using RegisterWindowMessage("QueryCancelAutoPlay") to disable the autoplay when the device is pluged in, etc etc.
I have only one problem remaining:
When a user plugs in a player with and external SD- windows shows a dialog box to choose an action (Open via explorer or view photos...), the window appears as topmost (also my application) and the users choose the open explorer option and the application is in the background.
I tried changing some registry values from 3 to 4 (I don't remember what keys), tried stopping the service: "WPDBusEnum" but no luck so far. I want to solve this problem without a 3rd party.

Please help.
Thanks in advance,
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
you can do it by configuring and putting autorun.inf file in the extrernal drive
Also you can configure different things using Autoplay manager.



Dear Anuroopsundd,

I cann't copy any autorun.inf because the application waits for the users to plug in their Mp3 players. Most of the players are fine and the RegisterWindowMessage("QueryCancelAutoPlay") cancels the dialog box. Only players with aditional SD cause the problem.
As far as the 2nd solution, I do not want to use 3rd party solutions. I'm looking for a .Net / registry solution.

Thank you anyway,

How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

Current User: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Local Computer: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
see details of disable autorun in below link


Thank you, I'll try it later and let you know.


Thank you

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial