I am very new of Inno Setup and I wish to add a Desktop icon to my executable in Inno Setup. The file is stored in
C:UsersPycharmProjectsGIOTTOconverterdistgiotto.ico
I tried to follow several examples but without results.
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "GIOTTO"
#define MyAppVersion "1.0"
#define MyAppExeName "GIOTTO.exe"
[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={{48A8A469-1711-46FD-AC87-1596EF57C123}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
DefaultDirName={pf}{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
OutputBaseFilename=GiottoSetup
SetupIconFile=C:UsersPycharmProjectsGIOTTOconverterdistgiotto.ico
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "french"; MessagesFile: "compiler:LanguagesFrench.isl"
Name: "italian"; MessagesFile: "compiler:LanguagesItalian.isl"
Name: "spanish"; MessagesFile: "compiler:LanguagesSpanish.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:UsersPycharmProjectsGIOTTOconverterdistGIOTTO.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:UsersPycharmProjectsGIOTTOconverterdist*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}{#MyAppName}"; Filename: "{app}{#MyAppExeName}"
Name: "{group}{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}{#MyAppName}"; Filename: "{app}{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}MicrosoftInternet ExplorerQuick Launch{#MyAppName}"; Filename: "{app}{#MyAppExeName}"; Tasks: quicklaunchicon
[Run]
Filename: "{app}{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…