The autorun.inf file helps to start / execute applications while inserting USB drives. You can disable this behavior using WIN32 API. Here is the implementation. By overriding WndProc() method, application can receive the global or system wide messages from Windows.
Monthly Archives:: February 2009
How to detect USB insertion and removal in VB.Net
You can find the USB insertion and removal using WIN32 API as well as WMI. This post is about detecting USB insert and removal using WIN32 API. The WndProc() helps to detect Windows Messages from OS. When a USB inserted or removed, Windows OS will send some message (WM_DEVICECHANGE) to all the applications. And the [...]