首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Inno安装程序未生成桌面图标

Inno安装程序未生成桌面图标
EN

Stack Overflow用户
提问于 2018-01-06 17:02:25
回答 1查看 2.6K关注 0票数 1

我正在使用Inno安装程序为我的EXE包生成安装程序。我的主EXE文件是由批处理文件驱动的。当我遵循下面给定的脚本时,安装程序正在创建快捷方式。但是我在Inno脚本中给出的图标并没有显示为图标,而是出现了默认的批处理图标。这个应用程序运行得非常好。提前谢谢。我的Inno脚本文件:

;由Inno安装脚本向导生成的脚本。;有关创建INNO安装脚本文件的详细信息,请参阅文档!

代码语言:javascript
复制
#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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-01-06 18:27:02

您正在使用bat图标,因为Innosetup在没有使用IconFilename的情况下被赋予了"cookie_crumbs_tableau.bat“,所以它默认使用bat图标。如果你想要一个自定义的图标,那么使用IconFilename在你的[Icons]部分设置一个图标。

代码语言:javascript
复制
[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"
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48125801

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档