I need to suppress autoplay for the mass storage devices. This needs to be achieved programatically through a service/deamon running in the background.
I know it can be done by an application which opens a window and handles the "queryCancelAutoPlay" message sent by windows.
Can this be done without GUI.I have the guid/pid/vid for the device whose autoplay needs to be disabled.
There is a registry entry that controls AutoRun:
This can be set to disable AutoRun on specific device types, from technet:
Sure. You can create a message-only window. That gives you a HWND without those annoying WM_PAINT messages etc. The other way is to use COM, IQueryCancelAutoplay