Is there any way Not to detect USB from windows PC?

153 views Asked by At

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...

3

There are 3 answers

4
Sujith PS On

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.

0
mleonard87 On

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.

2
David Grayson On

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.