Archive: How to ask for a reboot after uninstall?


How to ask for a reboot after uninstall?
Hi

I want to ask user for a reboot after uninstallation, and I am using:
!define MUI_FINISHPAGE_TEXT_REBOOT "AAA"
!define MUI_FINISHPAGE_TEXT_REBOOTNOW "BBB"
!define MUI_FINISHPAGE_TEXT_REBOOTLATER "CCC"

!insertmacro MUI_UNPAGE_FINISH

Is there anything else I need to include in my script?


use the "reboot" Instruction! i think that you should use "reboot" in the function the button call!
i am a begginer:)


All I wanna do is present this dialog:
http://nsis.sourceforge.net/Docs/Mod...es/screen2.png

How do I do?
I've searched the documentation and found nothing about it..


Are U using the .ini to make this finish page?
if you are,you can define a callback fuction which the installation will call when leaving the page.
with the code:
!insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "*.ini" "Field 2" "State"
${If} $INI_VALUE = 1
reboot
${EndIf}

in the function!
try it and look is it OK?
my English is poor!!I hope U can understand!


There's no need to edit the INI or to use Reboot manually. Simply set the reboot flag before the finish page shows. You can do that with SetRebootFlag or any of the /REBOOTOK enabled instructions.


Following kichick's advice, I am now using
SetRebootFlag true
in un.onInit and it works just fine!

Thanks a lot


I make a test!
use :
!define MUI_FINISHPAGE_TEXT_REBOOT "AAA"
!define MUI_FINISHPAGE_TEXT_REBOOTNOW "BBB"
!define MUI_FINISHPAGE_TEXT_REBOOTLATER "CCC"
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\AddressBook\LICENSE.txt" ;设置安装完成后提示的操作

!insertmacro MUI_PAGE_FINISH


but there isn't any radiobotton as http://nsis.sourceforge.net/Docs/Mo...ges/screen2.png
show? why ?


and if i want to ask a reboot after installation!where i should
lay the "setrebootflag true"?


If there aren't any buttons, it's because the reboot flag isn't set. To set it in the installation, you can use SetRebootFlag in .onInit or any section or function the installer executes.