简体   繁体   中英

trying to make two different buttons for restart & restart later in NSIS

As i am working with the NSIS code, i was trying to make two different buttons for restart & restart later in NSIS. Based on the nsis Docuementaion we need to use following commands(MUI_FINISHPAGE_TEXT_REBOOTNOW,MUI_FINISHPAGE_TEXT_REBOOTLATER) But i was getting an error called "macro named MUI_FINISHPAGE_TEXT_REBOOTNOW. not found". Could you plese let me know how can we do this tricky task.

,define MUI_FINISHPAGE_TEXT_REBOOTNOW "Yes, restart the computer now"

,define MUI_FINISHPAGE_TEXT_REBOOTLATER "No, I will restart the computer later"

!insertmacro MUI_PAGE_WELCOME

!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_FINISHPAGE_TEXT_REBOOTNOW

!insertmacro MUI_FINISHPAGE_TEXT_REBOOTLATER

!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_INSTFILES

!insertmacro MUI_LANGUAGE "English"

; MUI end ------

Section test
SectionEnd

Those are defines to customize the page, not macros you can call.

!include MUI2.nsh
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_REBOOTLATER_DEFAULT ; Make "later" the default option
!define MUI_FINISHPAGE_TEXT_REBOOTNOW "Reboot now!!!!" ; Custom text
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE English

Section
Sleep 2222
SetRebootFlag True # Pretend we did something that requires a reboot
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