简体   繁体   中英

How to display a custom text on MUI_PAGE_INSTFILES in NSIS

I am beginner in NSIS, and I want to display the custom text in MUI_PAGE_INSTFILES page as I have two options in Components page 1. Installation and 2. UnInstallation.

So when I choose Below options I am expecting the corresponding text in MUI_PAGE_INSTFILES page.

  1. For Installation Option the text should be "Installation completed"
  2. For UnInstallation Option the text should be "UnInstallation Completed"

Thanks in advance for your help on this.

The CompletedText attribute supports variables:

var mycompletedtext
var myfinishsubtext
CompletedText $mycompletedtext

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
!define MUI_INSTFILESPAGE_FINISHHEADER_TEXT "$mycompletedtext"
!define MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT "$myfinishsubtext"
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"

Section Installer
StrCpy $mycompletedtext "Installation completed"
StrCpy $myfinishsubtext "Something something"
SectionEnd

Section Uninstaller
StrCpy $mycompletedtext "UnInstallation Completed"
StrCpy $myfinishsubtext "Bye bye"
SectionEnd

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM