软件安装后如何安装USB驱动
我想在客户端计算机上安装我的软件后安装(或者至少准备安装)USB 驱动程序。
我有一个小程序,在 Visual Studio 2008 中用 C# 编写,我可以使用 VS2008 中的标准功能安装该程序。该程序通过 USB 电缆与硬件设备通信。 USB驱动程序来自ftdi,当用户将其插入USB插座时即可安装。这工作正常,但我希望在软件安装过程中复制该文件。完成此操作后,屏幕上会显示消息,例如“请将 USB 电缆插入插座并单击“确定”继续”,从那时起将自动执行驱动程序的安装。 (与为新打印机安装软件时相同)。
请建议我该怎么做。如果您能帮助我从一些例子开始,那就太好了。
非常感谢,亨利。
I want to install (or at least, do the prepairing for the installing of) a USB driver after my software is installed on the client computer.
I have a small program, written in C# in Visual Studio 2008, and I can install the program using the standard feature in VS2008. This program talks to a hardware device via USB cable. The USB driver is came from ftdi and can be installed when user plugs it in the USB socket. This works fine, but I want the file to be copied during the installation of the software. Once this is done, show message on screen e.g. "Please plug in your USB cable in to the socket and click OK to continue", on which the installing of the driver is automatically carried out from that moment. (The same as when you install the software for a new printer).
Please advice how I can do it. And it's great if you can help me start with some examples.
Great thanks, Henry.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这有效:
This works:
与此相关的 API 是“SetupAPI”,其中包含驱动程序安装框架 (DIFx)。特别是,您可能需要
DiInstallDriver
函数。但我不确定您是否需要显示“单击确定继续”消息。如果驱动程序已安装,Windows 将在插入 USB 设备后立即自动安装该驱动程序。
The relevant API for this is the "SetupAPI", which contains the Driver Install Framework (DIFx). In particular, you probably need the
DiInstallDriver
function.But I'm not sure if you need to show a "click OK to continue" message. If the driver is already installed, Windows will automatically install the USB device as soon as it's plugged in.