- NSIS Discussion
- A message box after PAGE_INSTFILES completed
Archive: A message box after PAGE_INSTFILES completed
yoachan
4th July 2011 12:48 UTC
A message box after PAGE_INSTFILES completed
Dear all,
please bear with me for it's only approx a week since I know NSIS.
I've made my first NSIS installer, but something still bother me.
I stated this two lines:
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
that will cause user to be able to see log after install/uninstall completed.
But I'm afraid some inexperienced user of mine didn't notice that the "next" button becomes available when the installation/uninstall completed. So they will wait until something happens. So I want to make a message box to appear just right after the last install/uninstall section completed to tell them that, hey, the installation/uninstall process is completed. You can either see the log detail or just click next to proceed to "finish window".
I tried to use an empty section that will only display messagebox, but what happens is that it's often that the messagebox appears even though the progress bar still at around 80%...
onInstSuccess Function won't work either for it will only be executed when everything is done instead of the "real installation/uninstall progress".
is there any way so that a message box will appear when and only when the install/uninstall progress is completed and the progress bar reach 100%.
thanks in advanced.
Regards,
Yoachan
Afrow UK
4th July 2011 15:04 UTC
Add a hidden Section at the end (no name).
Stu
yoachan
5th July 2011 04:35 UTC
@Afrow: Thanks for your reply....
Originally posted by Afrow UK
Add a hidden Section at the end (no name).
Stu
I've tried this approach as I said earlier... and this what occurs to me....
I tried to use an empty section that will only display messagebox, but what happens is that it's often that the messagebox appears even though the progress bar still at around 80%...
what I mean with empty section is a section with no name. sorry for the disambiguation....
MSG
5th July 2011 06:20 UTC
The installation progress bar shows what percentage of script the installer has finished executing. So once your sections will contain all the code required for your installation, the progress will be 99% or 100% by the time it reaches the messagebox.
Of course another option is to just do DetailPrint "Installation completed successfully." >_>
yoachan
5th July 2011 07:07 UTC
@MSG: Thanks for your reply :)
Originally posted by MSG
The installation progress bar shows what percentage of script the installer has finished executing. So once your sections will contain all the code required for your installation, the progress will be 99% or 100% by the time it reaches the messagebox.
Of course another option is to just do DetailPrint "Installation completed successfully." >_>
Yes... that make sense.........
so is it mean that I don't have any chance to put my message box there...? :(
MSG
5th July 2011 07:28 UTC
Well you can add the Nop command a hundred times... Or just use the RealProgress plugin.
pengyou
5th July 2011 11:05 UTC
You can use MUI_INSTFILESPAGE_FINISHHEADER_TEXT and MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT to define the text shown in the header of the installation page when the installation has been completed. See the "Installation page settings" section in the MUI manual for more information.
Another way to show some text when the installation completes is to use "SetDetailsPrint textonly" and "DetailPrint" to display a message just above the progress bar on the installation page. If you create a final section containing only these commands then the message will appear when installation is complete.
yoachan
6th July 2011 05:43 UTC
Thanks for you replies :)
Originally posted by MSG
Well you can add the Nop command a hundred times... Or just use the RealProgress plugin.
@MSG: RealProgress plugin seems to be a good solution. But when I look into it, I noted this warning:
Warning: This file type may contain malicious code.
By executing it, your system may be compromised.
So I'm holding back.... is it really safe to use it?
Originally posted by pengyou
You can use MUI_INSTFILESPAGE_FINISHHEADER_TEXT and MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT to define the text shown in the header of the installation page when the installation has been completed. See the "Installation page settings" section in the MUI manual for more information.
Another way to show some text when the installation completes is to use "SetDetailsPrint textonly" and "DetailPrint" to display a message just above the progress bar on the installation page. If you create a final section containing only these commands then the message will appear when installation is complete.
@pengyou: thank you, I'll look into it.
My current solution is removing
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
and add the following:
LogSet ON
so when installation complete, they will be directed to "finish_page". And if they need to see installation log, they can see it in install.log file. In most cases I think user won't need to see it. I just think that it will be needed in case installation failed and we need to know why and where it stops...
regards,
Yoachan
MSG
6th July 2011 06:44 UTC
Originally posted by yoachan
Thanks for you replies :)
@MSG: RealProgress plugin seems to be a good solution. But when I look into it, I noted this warning:
Warning: This file type may contain malicious code.
By executing it, your system may be compromised.
So I'm holding back.... is it really safe to use it?
All attachments on the wiki have this warning, because anyone can edit a wiki (that's the whole point of a wiki). Just make sure the file is from the actual creator (check the wiki page history). Anyway, here's the forum thread:
http://forums.winamp.com/showthread....hreadid=235740
yoachan
6th July 2011 16:16 UTC
@MSG: again, thanks for your replies :)
Originally posted by MSG
All attachments on the wiki have this warning, because anyone can edit a wiki (that's the whole point of a wiki). Just make sure the file is from the actual creator (check the wiki page history). Anyway, here's the forum thread: http://forums.winamp.com/showthread....hreadid=235740
Well, if that's the case. I'll give it a shot. And it's more likely case is closed for now. :)
Thank you, and I thank everyone that already replied in my thread. :)
regards,
Yoachan