我正在使用Inno安装程序为我的EXE包生成安装程序。我的主EXE文件是由批处理文件驱动的。当我遵循下面给定的脚本时,安装程序正在创建快捷方式。但是我在Inno脚本中给出的图标并没有显示为图标,而是出现了默认的批处理图标。这个应用程序运行得非常好。提前谢谢。我的Inno脚本文件:
;由Inno安装脚本向导生成的脚本。;有关创建INNO安装脚本文件的详细信息,请参阅文档!
#define MyAppName "cookie_crumbs_tableau"
#define MyAppVersion "2.0"
#define MyAppExeName "cookie_crumbs_tableau.bat"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{EF731CE0-43E4-4C87-B33C-8F16C2529E77}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=C:\{#MyAppName}
DisableDirPage=yes
DisableProgramGroupPage=yes
OutputDir=C:\Users\Cookie1\Desktop\EXEFINAL
OutputBaseFilename=cookie_crumbs_tableau_setup
;SetupIconFile=C:\Dev\EXE\prod\crumbs_tableau\dist\cookie_crumbs_tableau\crumbs.ico
SetupIconFile=C:\Users\Cookie5\Documents\Crumbs.ico
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
[Files]
Source: "C:\Dev\EXE\prod\crumbs_tableau\dist\cookie_crumbs_tableau\cookie_crumbs_tableau.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Dev\EXE\prod\crumbs_tableau\dist\cookie_crumbs_tableau\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
;Source: "C:\Dev\EXE\prod\crumbs_tableau\dist\cookie_crumbs_tableau\cookie_crumbs_tableau.bat"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent发布于 2018-01-06 18:27:02
您正在使用bat图标,因为Innosetup在没有使用IconFilename的情况下被赋予了"cookie_crumbs_tableau.bat“,所以它默认使用bat图标。如果你想要一个自定义的图标,那么使用IconFilename在你的[Icons]部分设置一个图标。
即
[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\program.exe"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; IconFilename: "{app}\program.exe"
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon; IconFilename: "{app}\program.exe"https://stackoverflow.com/questions/48125801
复制相似问题