Is there any way Not to detect USB from windows PC? The USB device should not mount on windows PC ,It should be handled by my application.. Suggestions please...
-
How to prevent mounting USB drive on windows? – user3167959 Jan 07 '14 at 07:16
3 Answers
As far as I know there is no way of stopping the mount on the windows PC, however, you could set it up to autorun so that when it is plugged it in attempts to launch your application. This answer has some information on how to do this: https://stackoverflow.com/a/255067
There is also the option to hide a drive in windows by removing is drive letter (http://www.howtogeek.com/97203/how-to-hide-a-drive-in-windows-so-that-no-one-will-know-its-there/) however, this is almost certainly going to stop your application from reading it too.
If this is for a specific security reason then perhaps you could look at encrypting the drive and allowing only the application to decrypt the data. Thus, whilst mounted in windows it will be of little use.
Sorry I couldn't be of much more help.

- 1
- 1

- 324
- 1
- 11
Microsoft provides a utility called devcon for free download.
It's a "Command Line Uility Alternative to Device Manager".
It can actually do many things that I won't get into here, but removing a plug & play device is a simple operation once you know the unique name of the device you want to manipulate.
Refer this to check how to work with it.

- 4,776
- 3
- 34
- 61
-
Is there any way we could disable the automounting of USB drive on Windows? – user3167959 Jan 07 '14 at 09:46
-
check http://www.uwe-sieber.de/drivetools_e.html , and put the code in a batch file , execute this batch file for each system restarting. – Sujith PS Jan 07 '14 at 09:53
-
Is it possible to access USB without mounting on Windows Xp? Means I have disable the autoconfig functionality in Windows... Can I access same USB device from other application? – user3167959 Jan 07 '14 at 13:23
-
No. without mounting you can not use, since application will check for particular device is enabled or not. – Sujith PS Jan 07 '14 at 13:28
It sounds like you don't want your device to show up as a drive in My Computer. In that case, why are you using the Mass Storage Device class at all? You could make a custom, vendor-specific device and talk to it using control/interrupt/bulk transfers with WinUSB. You would need to change the Device's USB descriptors to indicate it is a vendor-specific device and not a mass-storage device.

- 84,103
- 24
- 152
- 189
-
Qt application should write binary file to the Unmounted USB,Once that binary file validated, USB(mass storage device) should mount and give access to the user. How can we do this case possible? – user3167959 Jan 08 '14 at 05:02
-
That sounds pretty weird. It would help if you say a little bit about your overall project. Is the validation done by the PC or by the USB device? Why not just write the file to a temp folder on the PC and validate it there? – David Grayson Jan 08 '14 at 15:36