Skip to content
⌘ NSIS Forum Archive

How do I use my own icon for the installer?

16 posts

atfpodcast#

How do I use my own icon for the installer?

I tried
Include Modern UI

!include "MUI.nsh"
!define MUI_ICON "apta.ico"
when I compile the script it still has the same default icon for installer. I looked around but either Im too new to know the proper term is blind...😢
jpderuiter#
Is the icon file actually there?

How big is your installer?
See: http://forums.winamp.com/showthread.php?t=156086
Afrow UK#
Is your installer actually using the Modern UI interface? If it isn't then you just need to use the Icon compiler instruction.

Stu
atfpodcast#edited
Ok I figured it out when it installs it shows my icon but what about if I want my icon to be the icon of the .exe file?
Yathosho#
Originally Posted by atfpodcast View Post
Ok I figured it out when it installs it shows my icon but what about if I want my icon to be the icon of the .exe file?
Same icon. If your installer is very big, you might be affected by a common Windows issue and not see it. There are several posts on this issue.
atfpodcast#
Originally Posted by Yathosho View Post
Same icon. If your installer is very big, you might be affected by a common Windows issue and not see it. There are several posts on this issue.
Same icon? I been looking for code to make that same icon to be seen when it outputs the .exe

installer is only 5.1 megabytes and Of course I want to use the same icon
Anders#
Why are you making this so hard?

If you have !insertmacro MUI_LANGUAGE "xyz" in your code then you are using the Modern UI and the icon is set by MUI_ICON, if not you should use the plain Icon instruction.
atfpodcast#
Originally Posted by Anders View Post
Why are you making this so hard?

If you have !insertmacro MUI_LANGUAGE "xyz" in your code then you are using the Modern UI and the icon is set by MUI_ICON, if not you should use the plain Icon instruction.
I never used this program before and the instructions are Greek to me. I have had it a couple of days.. I don't want the default icon in this picture I want it to show the one above it.
Some one who is having a hard time understanding this program and Im making this hard? Yeah ok.
Anders#
Originally Posted by atfpodcast View Post
I never used this program before and the instructions are Greek to me. I have had it a couple of days.. I don't want the default icon in this picture I want it to show the one above it.
Some one who is having a hard time understanding this program and Im making this hard? Yeah ok.
Afrow UK already asked you if you are using the Modern UI, you failed to respond.

Just add this to your source:

!define MUI_ICON "myicon.ico"
Icon "myicon.ico"
one of them should work but since we cannot get a straight answer from you it is really hard to help...
atfpodcast#
Originally Posted by Anders View Post
Afrow UK already asked you if you are using the Modern UI, you failed to respond.

Just add this to your source:

one of them should work but since we cannot get a straight answer from you it is really hard to help...
I dont know what I am using. As I stated I am new and I saw code so i copied and pasted trying to get it to work.
atfpodcast#
This is my program
; Installs my graphics pack for Laughingbird Software The Logo Creator.
;--------------------------------

; The name of the installer
Name "Vector Characters Elements"

; The file to write
OutFile "install.exe"
icon apta_icon.ico
; Show install details
ShowInstDetails show

Function .onInit
SetOutPath $TEMP
File /oname=spltmp.bmp "splash.bmp"


splash::show 4000 $TEMP\spltmp

Pop $0 ; $0 has '1' if the user closed the splash screen early,
; '0' if everything closed normally, and '-1' if some error occurred.

Delete $TEMP\spltmp.bmp

FunctionEnd

;--------------------------------
; The default installation directory
InstallDir "$Documents\Laughingbird Documents\Logo Elements\Vector Characters"
; InstallDir "$Documents\Laughingbird Documents\Logo Logo Libraries\"
; Request application privileges for Windows Vista
RequestExecutionLevel user

;--------------------------------

; Pages

Page directory
Page instfiles

;--------------------------------
; The stuff to install
Section "" ;No components page, name is not important

; Set output path to the installation directory.
SetOutPath $INSTDIR

; Put file there
File C:\Users\Tony\Desktop\stuff\ai\vector\png\biz_man.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\biz_woman.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\casual_girl.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\chef.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\female_doc.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\girl_megaphone.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\santa.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\superhero.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\woodboy.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\woodgirl.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\xmas_girl1.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\xmas_girl2.png
File C:\Users\Tony\Desktop\stuff\ai\vector\png\xmas_girl3.png
SectionEnd ; end the section
atfpodcast#
it shows my icon in the GUI not for the .exe Do you think its a windows 7 issue? if some one else had it on their computer they would see the icon for setup.exe?
atfpodcast#
Ok I right mouse clicked the .exe and saw the icon so it looks like even with the install being only 5 megs now showing... owell..
atfpodcast#
I got it to work. How? I changed the outfile name from install.exe to setup.exe and the icon shows.
JasonFriday13#
That's probably because the icon cache wasn't updated each time the script is compiled. It's a windows thing. Copy/pasting the .exe will regenerate the icon, as will changing it's filename.
atfpodcast#
Originally Posted by JasonFriday13 View Post
That's probably because the icon cache wasn't updated each time the script is compiled. It's a windows thing. Copy/pasting the .exe will regenerate the icon, as will changing it's filename.
That's crazy windows hehe