how to change the icon of the shortcut of accde in inno setup - inno-setup

Everyone I created a DB and after that, I compile it ACCDE and I use Inno setup for making installer of ACCDE file but I have a problem I want to change the Icon of the shortcut which is created by inno setup on the Desktop. Any idea how to perform this task. Thanks in advance.

Put down {commondesktop} as Name in the Icons section, if you want to make a shortcut on the Desktop Window. That's all.
Assume the name of your ACCDE is "example.accde".
See below.
#define MyAppName "Example"
#define MyAppFullVersion "0.1.0"
#define MyAccdeFileName "example.accde"
[Setup]
AppId={{2D9CC75F-E3DA-4E86-A659-03301DDE1C33}}
AppName={#MyAppName}
AppVerName={#MyAppName} {#'V'}{#MyAppFullVersion}
DefaultDirName={pf}\{#MyAppName}
[Files]
Source: "{#MyAccdeFileName}"; DestDir: "{app}"
[Icons]
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAccdeFileName}"; WorkingDir: "{app}"

Use IconFilename parameter of your [Icons] section entry:
[Icons]
Name: "{commondesktop}\My DB"; Filename: "{app}\db.accde"; IconFilename: "{app}\myicon.ico"

Related

Shortcut to a folder on desktop in Inno Setup

I have made an exe file with Python and now I am trying to make an installer for it. I want to add a command in Inno Setup so after the installation it creates a shortcut to a folder in the installed directory (program folder/mixes). I want the shortcut to be on the desktop. I understand that you do it in the [Icons] sections but the examples I found were making a shortcut to an exe file but I want to make a shortcut to a folder. How do I do that? below is the Inno code:
#define MyAppName "Blender"
#define MyAppVersion "1.5"
#define MyAppExeName "Blender.exe"
[Setup]
AppName={#MyAppName}
AppVersion={#MyAppVersion}
DefaultDirName={autopf}\Cybercrete
DisableProgramGroupPage=yes
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; \
GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Dirs]
Name: "{app}"; Permissions: users-full
[Files]
Source: "C:\CyberCrete\Ver 1.5\Output\Blender\{#MyAppExeName}"; DestDir: "{app}"; \
Flags: ignoreversion
...
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; \
Tasks: desktopicon
Name: "{commondesktop}\Setup"; Filename: "{app}\Setup.exe"; \
WorkingDir: "{pf}\Program"; IconFilename: "{app}\Setup.ico"
[Run]
Filename: "{app}\{#MyAppExeName}"; \
Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; \
Flags: nowait postinstall skipifsilent`
I read many forums but they are about making shortcuts to exe files not folders.
Creating a shortcut to a folder is the same as creating shortcut to a file. Just use the path to the folder as the shortcut target:
[Icons]
Name: "{autodesktop}\My Folder"; Filename: "{app}\My Documents"
Though indeed, you should not store user's documents into app installation folder. Use user's Documents folder or application data folder.
Granting users full permissions to the program's installation folder is an equally bad practice.
Seems like this link explains everything you should need to know about creating shortcuts.
My program makes PDF files as output in a folder called "mixes". I
want to make it easier for the users to access the folder, that's why
I want to make a shortcut to the result folder.
I would highly recommend not to make the output folder in a relative folder in the program files (i.e. in a folder that is located in a location that is based on where the program is installed). This is both not easily found and will often need Admin permissions to write to a folder stored there.
I would recommend placing the folder in Documents (assuming this is Windows) or in AppData, which would make the folder both more easily accessible and will not run into permission issues.

Innosetup - problem putting icon on uninstaller in start menu

I'm using Innosetup for a very simple Windows C++ app. It just has an icon for the main EXE in the start menu group, plus another icon for the uninstaller (unins000.exe, created by Innosetup).
In the [Files] section of the script is:
Source: "C:\...\telecine.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\...\Telecine.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\...\uninstall.ico"; DestDir: "{app}"; Flags: ignoreversion
and in the [Icons] section:
Name: "{autoprograms}\Nightshade Arts\Telecine\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\Telecine.ico"
Name: "{autoprograms}\Nightshade Arts\Telecine\Uninstall"; Filename: "{app}\unins000.exe"; IconFilename: "{app}\uninstall.ico"
What works: the two entries are in the program group, the shortcut to Telecine.exe has the Telecine.ico icon next to it, the shortcut to the uninstaller works.
Problem: the uninstaller icon is not the one in uninstall.ico, it is something else, probably contained in unins000.exe itself.
Not sure what has gone wrong. uninstall.ico is there is the app directory, and it contains the right icon. Just doesn't show up.
Not sure where I've gone wrong?

Inno Setup - titles my setup as "My Setup", how to change this?

Here is my code: As you see I have given the name of my application, but still I get the title "My Setup" when I run it
[Setup]
AppName=Diabetis
AppVersion=0.9
DefaultDirName={pf}\Diabetis
DefaultGroupName=Diabetis
UninstallDisplayIcon={app}\Diabetis.exe
Compression=lzma2
SolidCompression=yes
OutputDir="C:\Users\nwsco\source\repos\Diabetis_sqllite\"
[Dirs]
Name: {app}; Permissions: users-full //to allow manipulating database
[Files]
Source: "C:\Users\nwsco\source\repos\Diabetis_sqllite\Diabetis\bin\Debug\Diabetis.exe"; DestDir: "{app}"
Source: "C:\Users\nwsco\source\repos\Diabetis_sqllite\Diabetis\bin\Debug\Diabetis.db"; DestDir: "{app}"
Source: "C:\Users\nwsco\source\repos\Diabetis_sqllite\Diabetis\bin\Debug\DSettings.db"; DestDir: "{app}"
Source: "C:\Users\nwsco\source\repos\Diabetis_sqllite\Diabetis\bin\Debug\Diabetis.pdb";
[Icons]
Name: "{group}\Diabetis"; Filename: "{app}\Diabetis.exe"
I solved my problem by adding:
OutputBaseFilename=Diabetis_Setup.exe
but now I have another problem, the program will display Diabetis_Setup.exe.exe, writing therefore twice the .exe.
I have tried also:
OutputBaseFilename=Diabetis_Setup
but it does not like it

How can i create a directory and copy exe file to this directory while installing my program using InnoSetup?

I have this automatic script that InnoSetup did :
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[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=
AppName=VideoScreenRecorder
AppVersion=1.5
;AppVerName=VideoScreenRecorder 1.5
AppPublisher=Daniel Lipman
DefaultDirName={pf}\VideoScreenRecorder
DefaultGroupName=VideoScreenRecorder
InfoBeforeFile=D:\ScreenVideoRecorderHelp.txt
OutputDir=D:\ScreenVideoRecorderCompiler
OutputBaseFilename=Setup
SetupIconFile=D:\Activity Monitor.ico
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "D:\C-Sharp\ScreenVideoRecorder\ScreenVideoRecorderWorkingVersion\bin\Debug\ScreenVideoRecorder.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\VideoScreenRecorder"; Filename: "{app}\ScreenVideoRecorder.exe"
Name: "{commondesktop}\VideoScreenRecorder"; Filename: "{app}\ScreenVideoRecorder.exe"; Tasks: desktopicon
[Run]
Filename: "{app}\ScreenVideoRecorder.exe"; Description: "{cm:LaunchProgram,VideoScreenRecorder}"; Flags: nowait postinstall skipifsilent
The installation take the exe file VideoScreenRecorder and copy it install it in program files directory...etc
What i want to do is to add another exe file to the installation : ffmpeg.exe
I want the installation program will create a directory at specific place for example c:\test and put the ffmpeg.exe at this directory .
The main exe file is VideoScreenRecorder.exe but i also need the ffmpeg.exe to be copied to another specific directory .
The directory where the ffmpeg.exe should be in is :
C:\Users\user name\AppData\Local\ScreenVideoRecorder\ScreenVideoRecorder\workingDirectory
I need the installation directory to create the directory at this place and then copy the ffmpeg.exe to the workingDirectory .
How can i do it ?
You can make DestDir for each file whatever you like, in this case with one of the Constants that Inno Setup has implemented.
[Files]
Source: "X:\PathToFFMPEGSource\ffmpeg.exe";
DestDir: "{localappdata}\ScreenVideoRecorder\ScreenVideoRecorder\workingDirectory";
Flags: ignoreversion
*Where X is the drive letter where your source ffmpeg.exe is located.

Add a check box to not add the start menu icons

So this is probably really simple, and I've been looking and looking for an example, but can't seem to find one.
I just need to add a check box to select the option NOT to create a start menu shortcut to the screen where it says, "Select Start Menu Folder - Where should Setup place the program's shortcuts?". Just not sure how to do this. Help would be vastly appreciated.
Here's my code so far:
[Setup]
AppName=My Launcher
AppVersion=1.1
DefaultDirName={pf}\My Launcher
DefaultGroupName=My Launcher
UninstallDisplayIcon={app}\myLauncher.exe
Compression=lzma2
SolidCompression=yes
[InstallDelete]
Type: files; Name: "{app}\myLauncher.exe";
[Files]
Source: "myLauncher.exe"; DestDir: "{app}"
Source: "QtCore4.dll"; DestDir: "{app}"
Source: "QtGui4.dll"; DestDir: "{app}"
Source: "QtNetwork4.dll"; DestDir: "{app}"
Source: "QtSql4.dll"; DestDir: "{app}"
Source: "Readme.txt"; DestDir: "{app}"
[Icons]
Name: "{group}\My Launcher"; Filename: "{app}\myLauncher.exe"
Under the [Setup] section, try adding this to the end:
AllowNoIcons=yes
See here for the official documentation on this property.

Resources