Archive: Reboot now, Reboot Later Processing


Reboot now, Reboot Later Processing
  I have some logging that I do in my: Function .onInstSuccess

At the end of my installation, I do not have it do a manual reboot, I let it ask... And if the user selects the reboot later option, it does not appear to process the .onInstSuccess, that being the case, what exit function does it process, .onRebootFailed..

Thanks,

Squirre1


Try to use Function .onGUIEnd


Naaa... I dont initialize logging unless the installation is actually started, not just ran.. Sooo, .onGUIEnd is not a good option, it will attempt to log closing lines when not initialized...

I just need to know the closing function that is called if someone chooses not to reboot at the end of any installation..


I'm guessing you're using MUI's built-in reboot option? If so, there is no such callback.

Go to ProgramFiles\NSIS\Contrib\Modern UI 2\Pages\Finish.nsh . Adjust these lines...

     ;Check whether the user has chosen to reboot the computer
${if} ${RebootFlag}
SendMessage $mui.FinishPage.RebootNow ${BM_GETCHECK} 0 0 $mui.FinishPage.ReturnValue
${if} $mui.FinishPage.ReturnValue = ${BST_CHECKED}
Reboot
${else}
/* Your code would go here */
Return
${endif}
${endif}