Search code examples
nsis

How to change the Header info (text) in NSIS at run time?


I am using NSIS i.e., null soft to create a windows installer. All working fine, but I need to change the header info text while installer is running.

For example:

In header info Now I am getting as follows,

Installing, Please wait while... 

But I need to change this info or text like Please wait... or any text. Herewith I have attached the screenshot and marked in red color. Please suggest some solution.

enter image description here


Solution

  • !include MUI.nsh
    !insertmacro MUI_PAGE_COMPONENTS
    !define MUI_PAGE_HEADER_TEXT "Blah blah"
    !define MUI_PAGE_HEADER_SUBTEXT "Sub blah blah"
    #!define MUI_INSTFILESPAGE_FINISHHEADER_TEXT "Blah blah completed" ; You only need this if MUI_PAGE_INSTFILES is the last page
    #!define MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT "Sub blah blah"
    !insertmacro MUI_PAGE_INSTFILES
    !insertmacro MUI_PAGE_FINISH
    !insertmacro MUI_LANGUAGE English
    

    Edit: And to change it during the install process:

    Section
    !insertmacro MUI_HEADER_TEXT "Hello" "world"
    Sleep 3333
    !insertmacro MUI_HEADER_TEXT "Still" "there?"
    Sleep 3333
    SectionEnd