简体   繁体   English

有什么方法不能从Windows PC中检测USB?

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

Is there any way Not to detect USB from windows PC? 有什么方法不能从Windows PC中检测USB? The USB device should not mount on windows PC ,It should be handled by my application.. Suggestions please... USB设备不应安装在Windows PC上,应由我的应用程序处理。

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. 据我所知,无法在Windows PC上停止挂载,但是,您可以将其设置为自动运行,以便在插入时尝试启动您的应用程序。 This answer has some information on how to do this: https://stackoverflow.com/a/255067 此答案具有有关如何执行此操作的一些信息: 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. 还可以通过删除驱动器号来隐藏Windows中的驱动器( http://www.howtogeek.com/97203/how-to-hide-a-drive-in-windows-so-that-no-one -will-know-its-there / ),这几乎肯定会阻止您的应用程序读取它。

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. Microsoft提供了一个名为devcon的实用程序免费下载。

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 . 您可以制作定制的,特定于供应商的设备,并使用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. 您需要更改设备的USB描述符,以表明它是特定于供应商的设备,而不是大容量存储设备。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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