I would like to replace the default logo in my NSIS installer (see image below), but I cannot find anything about this on the internet. Can it be done?
Asked
Active
Viewed 3.3k times
5 Answers
48
For the sake of completion, this is the full code I used to change the logo (using Anders method) and the executable icon (using CharlesB method). Also included MUI2.nsh as mentioned by Yuri Korolov.
!include "MUI2.nsh"
!define MUI_ICON "path\to\icon.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "path\to\InstallerLogo.bmp"
!define MUI_HEADERIMAGE_RIGHT

laurent
- 88,262
- 77
- 290
- 428
-
6I found that the standard bitmap exported by GIMP wouldn't display the `.bmp` file in the header. However if I exported a bitmap from Paint then it would work. – icc97 Apr 23 '17 at 21:49
-
@icc97 This GIMP's behaviour even today still applies. – y434y Dec 06 '19 at 11:24
27
put this anywhere in your .nsi (after inclusion of MUI.nsh):
!define MUI_ICON path_to_icon_file.ico

CharlesB
- 86,532
- 28
- 194
- 218
4
You have to include MUI or MUI2 in order to make it work in your script
!include "MUI2.nsh"
!define MUI_ICON "icon.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "header.bmp"
!define MUI_HEADERIMAGE_RIGHT

Sujay
- 6,753
- 2
- 30
- 49

Yuri Korolov
- 500
- 2
- 6
4
MUI_ICON changes the .exe icon and that icon is used by default in the MUI header but if you want to use a specific bitmap in the header you can use MUI_HEADERIMAGE/MUI_HEADERIMAGE_BITMAP
You can find all the Modern UI configuration options in the docs

Anders
- 97,548
- 12
- 110
- 164