Custom desktop icon with inno setup - icons

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??

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.

You pasted the [Task] entry whereas the [Icons] entry is what creates the actual icon.
For that, you want to install a custom icon file, and set the IconFilename (and optionally IconIndex) parameter.

Before you use Inno setup, change the .exe icon with windows platform. After you change it then use Inno, and your .exe file becomes the icon that you have changed before using Inno.
In other words: Inno setup uses default icon to launch as a .exe icon, so you can change the icon before use Inno. It works for me.

Related

Atom material icon not working in WebStorm

I installed Atom Material icon plugin in WebStorm 2021.1.3.
When I write index.html the icon does not show it, but when I change the name before .html (e.g. othername.html) it displays the icon.
How do I display an icon for index.html?
In most cases, the file type of index.html was changed to Auto-detect file type by context or Text. You can change it in the settings: Preferences / Settings | Editor | File Types, find Auto-detect file type by context or Text and delete index.html from File name patterns list.
This problem is due to a defect in the icon file, which you can see in the following link:
https://material-theme.com/docs/reference/associations/#index
To solve this problem, you must enter the following path: File > Settings > atom material icons settings
Other items are available in the photo :
Rename the icon name from index to indx
Note that the index name must be changed in the settings section so that the icons are displayed correctly. This was the solution I was able to solve my problem. Good luck

Select Custom AutoHotKey Tray Icon from .ico file

I have a functioning AHK script, and I want to assign a custom icon to it in the toolbar, I have a .ico file that I created that has the icon that i want to use. I can use the default (first) page in the .ico file just fine, but I need to use the second one. How do I do this?
This is the troublesome line of code
Menu, Tray, Icon, \\volvo\users\pleavitt\Documents\Paul\Interface\Custom Icons\T-CheckIcon.ico,1,1
If I change the first "1" at the end of the code to a "2" it throws an error, but from this webpage I thought that that is what I was supposed to do.
In conclusion, I want to be able to select a page from the .ico file to use as the tray icon for my AHK script.
thanks!
Paul
Menu
Documentation: http://ahkscript.org/docs/commands/Menu.htm
Menu, Tray, FileName [, IconNumber, IconWidth]
IconNumber and IconWidth are optional.
I am unsure that it supports Files on a network, i.e. \\path\to\file.ico.
Try copying it to the script's directory, and use the relative path like so :
Menu, Tray, Icon, %A_ScriptDir%\T-CheckIcon.ico
NB: Be sure to use the latest version of AutoHotkey.

Ubunto12.04-Gnome3 -- Show icon in alt-tab menu using .desktop file

After Googling for hours, I didn't find any answer for the following issue and so glad if anyone could help.
I use Ubuntu 12.04 LTS with Gnome-shell 3.4.1. Consider the following simple program in file $HOME/a.py which I have made it executable:
#!/usr/bin/env python
import gtk
w = gtk.Window()
w.set_size_request(250, 150)
w.set_title("test program")
w.connect('destroy', lambda x: gtk.main_quit())
w.show_all()
gtk.main()
I've used MenuLibre to define a_run0.desktop in $HOME/.local/share/applications as below:
[Desktop Entry]
Version=1.0
Type=Application
Name=a_run
Comment=comm.
Icon=applications-development
Exec=/home/vsop/a.py
Path=
Terminal=false
StartupNotify=true
Categories=
Name[en_US]=a_run
Comment[en_US]=comm.
I made a_run0.desktop to be executable and I see a file named “a_run” in $HOME/.local/share/applications with proper icon (Icon=applications-development
). Running the program and using alt-tab, the icon is also shown in alt-tab menu quite well.
The question is, when I copy “a_run” file (actually a_run0.desktop) to $HOME/Desktop, the file is shown with correct icon in Desktop but after running it, the icon shown in alt-tab menu is changed to unknown-red-circle-icon with the name of original file “A.py” underneath.
What is made this problem and how can I see the defined-icon (in .desktop file) correctly in the alt-tab menu after running the program from $HOME/Desktop?
Try to add icon to your window using python and gtk. I think that icon in .desktop file only specify how .desktop file is shown in system not application.
Certainly in more recent versions of Gnome shell (I'm using 3.14.1) the entry Icon should point to the actual icon you want to use, e.g
Icon=/home/vsop/a_icon.xpm

Is it possible to add custom icon to hta

Is it possible to add custom icon to hta? What I mean is change the default hta file icon, which is "System Application Icon". Can it be done without assigning new icon to the extension, and not using shortcuts to the file ?
Like this
WinRAR can help you do that.
Package your hta & icon file to exe;
In options,
a. select "silent" extract;
b. set extract path;
c. create extract path and then put that icon file there, select icon in this path.
d. set run your hta(c:\your_path\your.hta) after exe file extracted.
(i could not provide more detail because i don't have WinRAR installed right now, it's a common way to add icon for hta.)
Every time user run the exe you created, it will just extract hta, icon to the path you specified, and then run your hta. the exe file will have the icon display, even copy to another computer.
If you get all work done correctly, you will get a exe file with the icon you defined.
BTW, you can also try google: hta exe icon
Good luck!
Yup, you sure can: this. You embed the icon in the hta file
Better You use Exescript Software
It's Good because ease of its use and add icon to resource file (which appears on top border of hta)
After that add icon in settings menu to Exe File and build the project
U will get a exe file with custom icon.

WindowIcon not showing up despite being valid in resource (and used elsewhere)

In my last question (Qt/C++: Icons not showing up when program is run) I asked how to get an icon to show up on a toolbar and was told I needed a Qt Resource, which I added and that fixed my problem, the icon did show up on the toolbar.
Now I'm trying to set the title icon of a window, using the same resource file, and it shows up fine in the Qt preview viewer but blank in the actual program. I am using a MainWindow which has an MDIArea and the children are MainWindows as well; neither the parent MDI nor child MDI windows icons will show properly. On the parent, I see the regular "Windows Application icon" and on the child, the icon is completely blank.
How can I solve this?
You will have to go through a standard resource file for windows. (That is, a .rc)
The process (as described in the documentation) is:
Store the ICO file in your application's source code directory, for
example, with the name myappico.ico. Then, create a text file called,
say, myapp.rc in which you put a single line of text:
IDI_ICON1 ICON DISCARDABLE "myappico.ico"
Finally, assuming you are using qmake to generate your makefiles, add this line to your myapp.pro
file: RC_FILE = myapp.rc
Regenerate your makefile and your application. The .exe file will now be represented with your icon in Explorer.
In the Visual Studio case you're simply able to add a resource to your project.

Resources