我使用inno设置来发布我的应用程序,它工作正常。但现在我需要同时安装USB驱动程序(我有inf文件)。你能告诉我怎么做吗?有关我当前的inno设置.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
我谷歌很多文章,但仍然无法弄清楚。 如果您有任何疑问,请随时与我联系。真的很感谢你的帮助!
埃里克
答案 0 :(得分:0)
根据this article中的信息,应该可以创建适当的[Run] -Entry。 假设您的.INF文件有一个DefaultInstall部分,它可能应该是:
[Run]
Filename: "RUNDLL32.EXE"; Parameters: "SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 path-to-inf\infname.inf"