Windows 驱动程序安装程序,它还安装 java 本机库
基本上,我希望创建一个静默 Windows 安装程序,它将安装 Windows 驱动程序和 Java 本机库 (RXTX),我们的程序使用它与设备进行通信。
我们有适用于 Windows XP、Vista 和 7 32 位和 64 位的驱动程序可供安装。至于Java本机lib,它只是一个文件,但我们必须首先读取注册表以获取JavaHome路径,以便将dll复制到正确的位置(JavaHome/bin)。
我听说过 DIFx 框架,但我不知道它是否可以浏览注册表并从密钥中提取文件路径。另一方面,我也许可以使用一个小型 C# 软件来完成此操作,但我担心在安装驱动程序时会遇到问题,这些驱动程序(据我所知)需要安装在 Windows vista 和 7 的驱动程序存储中,但不能在 Windows XP 中。
知道我可以用什么来做到这一点吗?
Basically I'm looking to create a silent windows installer which will install Windows drivers and a Java native library (RXTX) which our program use to communicate with the device.
We have drivers for Windows XP, Vista and 7 32bits and 64bits to install. As for the Java native lib, it's only a single file but we have to read the registry first to get the JavaHome path in order to copy the dll at the right place (JavaHome/bin).
I heard about the DIFx framework but I don't know if it can browse the registry and extract a file path from the key. In the other hand, I might be able to just do this with a small C# software but I'm afraid I'll have problems installing the drivers which (AFAIK) needs to be installed in a driver store in Windows vista and 7 but not in windows XP.
Any idea what I could use in order to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我最终创建了一个小型 Visual C++ 程序,该程序使用 RegGetValue() 浏览注册表以查找 JavaHome 并将 Java 本机库复制到其中。至于驱动程序安装,我使用了DifxAPI(DriverPackagePreinstall())。
目前我只在 Windows 7 64 位上测试了这个解决方案,但到目前为止它按预期工作。
I ended up creating a small Visual C++ program which browse the registry using RegGetValue() to find the JavaHome and copy the Java native library in there. As for the driver installation, I used DifxAPI (DriverPackagePreinstall()).
For now I only tested this solution on Windows 7 64-bit but so far it's working as expected.
大多数安装创作工具都提供驱动程序支持,甚至可以安装 Java 库。以下是一个可以帮助您入门的列表:http://en.wikipedia.org/wiki/List_of_installation_software
在你决定使用一个工具之后,尝试将它用于你的包。如果您遇到问题,您可以提出更具体的问题。
Most setup authoring tools offer driver support, and can even install Java libraries. Here is a list that can get you started: http://en.wikipedia.org/wiki/List_of_installation_software
After you decide on a tool, try to use it for your package. If you encounter problems you can then ask more specific questions.