2
votes

I understand that NSIS uses the installer icon (or MUI_ICON) as the header image by default. And that using MUI_HEADERIMAGE without specifying MUI_HEADERIMAGE_BITMAP uses the default Contrib\Graphics\Header\nsis.bmp

But is it possible to not display a header image altogether? (Aside from the option of specifying a blank (all-white) image as MUI_HEADERIMAGE_BITMAP)

2

2 Answers

1
votes
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_RIGHT
!define MUI_CUSTOMFUNCTION_GUIINIT HideHeaderImage
!include MUI2.nsh
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE English

Function HideHeaderImage
!if "${MUI_SYSVERSION}" >= 2.0
  ShowWindow $mui.Header.Image 0
!else
  GetDlgItem $0 $hwndParent 0x416
  ShowWindow $0 0
!endif
FunctionEnd

Alternatively you could edit one of the UIs in ${NSISDIR}\Contrib\UIs\modern*.exe with Resource Hacker to move the image control offscreen and then use MUI_UI or MUI_UI_HEADERIMAGE in your script to select your new UI file.

-1
votes

Can you show what function HideHeaderImage would look like for

!define MUI_WELCOMEFINISHPAGE_BITMAP "leftside.bmp"