Archive: Restart does not work when user click "RESTART NOW"


Restart does not work when user click "RESTART NOW"
I try to restart my installer after I finish all things.
I include two installs into one custom page. When user finishs, the second installer will require them to restart or not.
I have set flag in function .onInit SetRebootFlag true.
However, sometimes my installer restart, or it is not. If user click radio button "RESTART NOW", it only closes all the other application omit my installer and does not restart.
Do I need to add some codes or anything else?
If you know, please help me!
Thank in advance,


Sorry if I miss something here,
do you use the Reboot instruction?

EDIT:
The SetRebootFlag is working all the time for me.
Also, you may add it at the bottom of your install section e.g.

outfile 'reboot test.exe'
InstallDir '$PROGRAMFILES\Reboot Test'

!include 'mui.nsh'

!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE "English"

section -
SetOutPath '$INSTDIR'
SetRebootFlag true
SectionEnd