使用InstallShield安装驱动程序
我需要创建一个 InstallShield 12 项目,在 WinXP 或更高版本上安装驱动程序。如何使用 InstallShield 12 来完成此操作?
I need to create an InstallShield 12 project that installs a driver on WinXP or higher. How can I do it using InstallShield 12?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我们通常做的是编写一个DLL(用C或C++),它使用SetupAPI调用(SetupDiXXX和UpdateDriverForPlugAndPlayDevices)来完成所有安装工作。
然后,让安装程序脚本(IS、Inno、Wise)调用此 DLL。
What we usually do is write a DLL (in C or C++) which uses SetupAPI calls (SetupDiXXX and UpdateDriverForPlugAndPlayDevices) to do all the installation work.
And then, have the installer script(IS, Inno, Wise) make calls into this DLL.
在 2012 Spring Pro(我不能谈论早期版本)中,您可以简单地使用所需的组件创建一个新功能(注意:对 64 位端使用一个组件,对 32 位端使用另一个组件,两者都可以)在相同的功能下)。对于每个驱动程序组件,进入该组件下树视图控件中的“高级设置”部分,然后进入“设备驱动程序设置”,并在“常用”选项卡上选中“此组件包含设备驱动程序”框。在“使用 DIFx 2.10 的运行时选项”下,设置任何所需的配置位,例如“始终覆盖任何现有的设备驱动程序”,然后在“公共”选项卡的底部,确保设置适当的体系结构/位数。然后就让它安装——InstallShield 加上 DIFx 2.10 会自动处理一切。
至少,这对于我们定制的、签名的、基于 WinUSB 的驱动程序来说工作得很好。弄清楚这一点比实际去做要困难得多。
In 2012 Spring Pro (I can't speak to earlier versions), you can simply create a new feature with the desired components (note: use one component for the 64-bit side, and another component for the 32-bit side, both under the same feature). For each of the driver components, go into the Advanced Settings section in the tree view control under the component, then into the Device Driver settings, and on the Common tab, check the "This component includes a device driver" box. Under Runtime Options using DIFx 2.10, set any desired configuration bits, like "Always overwrite any existing device driver", and then at the bottom of the Common tab, be sure to set the appropriate architecture/bittage. Then just let it install -- InstallShield plus DIFx 2.10 take care of everything automagically.
At least, this worked just fine with our custom, signed, WinUSB-based driver. It was a lot harder figuring this out then actually doing it.
我简单的方法是包装 dpinst
使用 命令行标志来抑制 gui 并阅读 返回代码以确定安装是否正常
I simple way is to wrap dpinst
Use the command line flags to suppress a gui and read the return code to figure out if the install worked correctly