构建新驱动程序 - 如何安装新设备 .inf 文件
请原谅我的基本问题,固件人员。我“被赋予”了 HID 设备驱动程序的所有权。当前的驱动程序已过时,因为它不再支持该产品线支持的全系列 USB pid。我拥有所有源代码,包括一个简单的文本文件,其中包含受支持的 PID 列表。我添加了新范围,并执行了几个标题为“IncrementVersions”、“BuildINFs”和“BuildWindowsDrivers”的 Perl 脚本。如果这些脚本有帮助,我可以分享它们。
结果是我似乎有一些已正确更新的 .inf 文件:已升级,并且包含新的 USB PID 范围。但是,如果我右键单击其中一个并选择“安装”,我会收到一条消息“系统找不到指定的文件”。同样,如果我进入 Dev Man 并尝试更新驱动程序,Dev Man 会说我已经在使用该设备的最佳驱动程序。
我确实注意到该驱动程序的早期版本内置于 setup.exe 文件中。我以为我可以直接安装 .inf 文件,但也许这些安装包装器包含一些必要的功能?如何从 .inf 创建 setup.exe 文件?
这些是否有助于指出我可能做错的事情?我可以分享什么来提供更多有用的信息?
Forgive my basic questions, firmware guy here. I have been "gifted" ownership of the driver for a HID device. The current driver is outdated in that it no longer supports the full range of USB pids that this product line supports. I have all of the source code, including a simple text file that includes the list of supported PIDs. I added the new range, and executed several Perl scripts with titles like "IncrementVersions", "BuildINFs" and "BuildWindowsDrivers". I can share these scripts if they're helpful.
The upshot is I seem to have some .inf files that were updated correctly: were up-rev'd, and contain the new range of USB PIDs. But if I right click on one and select "Install", I get a message that says "The system cannot find the file specified". Similalrly, if I got into Dev Man and try to update the driver, Dev Man says I'm already using the best driver for that device.
I do notice that previous versions of this driver were built into setup.exe files. I thought I could install an .inf file directly, but perhaps these setup wrappers contain some necessary functionality? How can I create a setup.exe file from an .inf?
Is any of this helpful in pointing me toward what I might be doing wrong? What can I share that would provide more useful info?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以直接安装 INF 文件,但需要了解三件重要的事情:
INF 文件需要一个
DefaultInstall
部分,其中包含诸如“CopyINF=your_inf_name.inf”之类的行。 (实际上我认为 Windows 10 上可能不需要)。您需要一个
CatalogFile
指令来引用您正确拥有的同一目录中的.cat
文件使用您的代码签名证书签名。您需要在Windows资源管理器中右键单击INF文件,然后单击“安装”才能实际安装它。
由于系统抱怨文件丢失,当然您还应该仔细阅读 INF 文件,并确保它引用的所有文件都存在于 Windows 知道如何找到它们的地方。
You can install INF files directly but there are three important things to know:
The INF file needs a
DefaultInstall
section with a line like "CopyINF=your_inf_name.inf". (Actually I think it's not needed on Windows 10 maybe).You need a
CatalogFile
directive that refers to a.cat
file in the same directory that you have properly signed with your code signing certificate.You need to right-click on the INF file in Windows Explorer and click "Install" to actually install it.
Since the system is complaining about a missing file, of course you should also read your INF file carefully and make sure all the files it refers to exist somewhere where Windows knows how to find them.