简体   繁体   中英

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

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

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM