Skip to content
⌘ NSIS Forum Archive

Change exe icon

5 posts

paramjit999#

Change exe icon

Hello
I am trying to combine two exes into one using following code

!include "MUI.nsh"
!define MUI_ABORTWARNING
!define MUI_ICON "C:\Folder1\icon1.ICO"
; MUI Settings



OutFile exe1.exe

SilentInstall silent

Section Main
SetOutPath "C:\Folder1"
SetOverwrite on
File "C:\NewFileFolder\icon1.ICO"
File "C:\NewFileFolder\exe1.exe"
File "C:\NewFileFolder\exe2.exe"

ExecWait "C:\NewFileFolder\exe1.exe"
SectionEnd



but i am not able to change the icon of the final exe it takes the default icon.
i want icon1.ico to be the icon of the final exe generated

Thanks
MSG#
Since the installer icon is determined at compiletime, you need to supply the compiletime path to the ico file. In your case that'd be C:\NewFileFolder\icon1.ICO, from the looks of it.
MSG#
The file needs to exist in the path you specify. If it doesn't work, the path is wrong or the file doesn't exist.