Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom desktop icon with inno setup

I have the following in my inno setup file which creates a desktop icon no problem:

Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"

However, the main file that launches the program is a VBS file rather than an EXE. I'd like to have a nice icon on the shortcut rather than the VBScript one, but can't find an option to change the icon.

Is there such an option available to set a custom icon??

like image 988
Michael Berry Avatar asked Sep 20 '11 12:09

Michael Berry


People also ask

How do I create a desktop shortcut for Inno?

In [Files] section, you install your giotto. ico to the application folder (you may want to install the icon only when the desktopicon task is selected). In [Icons] section, you create the desktop icon using the installed giotto. ico (when the desktopicon task is selected).

How do I change the icon on my Inno?

As you know the application icon is built into the .exe file. The Inno Setup cannot modify the .exe files. And there's no other way to override the application icon by an external one. You have to edit the .exe file yourself, before building the installer.


1 Answers

The Inno-Setup help about the [Icons] section says:

IconFilename

The filename of a custom icon (located on the user's system) to be displayed. This can be an executable image (.exe, .dll) containing icons or a .ico file. If this parameter is not specified or is blank, Windows will use the file's default icon. This parameter can include constants.

Example: IconFilename: "{app}\myicon.ico"

(source)

Hope that helps.

like image 162
gregseth Avatar answered Oct 28 '22 03:10

gregseth