Archive: Change exe icon


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


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.


I changed the path still i am not able to get the icon changed


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.


Use !include "MUI2.nsh", old MUI is deprecated.