nat*_*han 11 windows inno-setup driver
我想使用InnoSetup为串口安装驱动程序.我有inf文件,我可以通过设备管理器手动安装驱动程序,但我希望能够在我的安装程序中包含驱动程序,以便用户不必经历自己安装驱动程序的麻烦.
Ser*_*yuz 13
请参阅MSDN上的InstallHinfSection.该文档还提到了如何通过调用"Rundll32.exe"来调用安装.可能你会得到这样的东西:
[Files]
..
Source: "driver\my_x86driver.inf"; DestDir: {app}\driver;
Source: "driver\my_x86driver.sys"; DestDir: {app}\driver;
[Run]
..
Filename: {sys}\rundll32.exe; Parameters: "setupapi,InstallHinfSection DefaultInstall 128 {app}\driver\my_x86driver.inf"; WorkingDir: {app}\driver; Flags: 32bit;
Run Code Online (Sandbox Code Playgroud)
请注意,您可能需要在64位系统中以64位模式运行安装程序才能安装驱动程序:
[Setup]
..
ArchitecturesInstallIn64BitMode=x64
Run Code Online (Sandbox Code Playgroud)
您还可以根据机器架构(例如Check: Is64BitInstallMode)运行检查以运行.inf文件的版本.
这是一个更好的答案:Inno setup:使用rundll32或dpinst安装驱动程序吗?
在Windows 7及更高版本上使用InstallHinfSection似乎已损坏或充满困难。从批处理文件使其工作变得困难,从innosetup使它工作变得更加困难。DPINST似乎更可取,并且更简单。
小智 5
我像这样使用 dpinst:
[Files]
Source: "Source\dpinst\dpinst32.exe"; DestDir: "{app}\driver"; DestName: dpinst.exe; Check: not IsWin64; Flags: ignoreversion
Source: "Source\dpinst\dpinst64.exe"; DestDir: "{app}\driver"; DestName: dpinst.exe; Check: IsWin64; Flags: ignoreversion
[Run]
Filename: "{app}\driver\dpinst.exe"; Parameters: "/A /LM";
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14651 次 |
| 最近记录: |