如何在应用程序中同时安装USB驱动程序?

如何在应用程序中同时安装USB驱动程序?,usb,driver,inno-setup,Usb,Driver,Inno Setup,我使用inno安装程序发布我的应用程序,它运行良好。但是现在我需要同时安装USB驱动程序(我有inf文件)。你能告诉我怎么做吗?请参考以下内容了解我当前的inno setup.iss文件 #define MyAppName "SAMPLE" #define MyAppVersion "1.20" #define MyAppExeName "SAMPLE.exe" [Setup] AppId={#MyAppName} AppName={#MyAppName} AppVersion={#MyApp

我使用inno安装程序发布我的应用程序,它运行良好。但是现在我需要同时安装USB驱动程序(我有inf文件)。你能告诉我怎么做吗?请参考以下内容了解我当前的inno setup.iss文件

#define MyAppName "SAMPLE"
#define MyAppVersion "1.20"
#define MyAppExeName "SAMPLE.exe"

[Setup]
AppId={#MyAppName}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
DefaultDirName={userdocs}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputDir=E:\Temp\Inno\Easy_Power_Beta_120
OutputBaseFilename=SAMPLE-Beta_1_20-setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "E:\Bitbucket\EA2015\bin\Debug\SAMPLE.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Bitbucket\EA2015\bin\Debug\cmd.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\Bitbucket\EA2015\bin\Debug\default.png"; DestDir: "{app}"; Flags: ignoreversion
…

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
我在谷歌上搜索了很多文章,但还是搞不懂。 如果您有任何问题,请随时与我联系。非常感谢你的帮助

Eric

根据其中的信息,应该可以创建适当的[Run]-条目。 假设您的.INF文件有一个DefaultInstall部分,它可能类似于:

[Run]
Filename: "RUNDLL32.EXE"; Parameters: "SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 path-to-inf\infname.inf"