Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   A message box after PAGE_INSTFILES completed (http://forums.winamp.com/showthread.php?t=332151)

yoachan 4th July 2011 11:48

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:
code:

!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 14:04

Add a hidden Section at the end (no name).

Stu

yoachan 5th July 2011 03:35

@Afrow: Thanks for your reply....

Quote:

Originally Posted by Afrow UK (Post 2785174)
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....
Quote:

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 05:20

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 06:07

@MSG: Thanks for your reply :)

Quote:

Originally Posted by MSG (Post 2785326)
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 06:28

Well you can add the Nop command a hundred times... Or just use the RealProgress plugin.

pengyou 5th July 2011 10:05

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 04:43

Thanks for you replies :)

Quote:

Originally Posted by MSG (Post 2785329)
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:
code:
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?

Quote:

Originally Posted by pengyou (Post 2785347)
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
code:

!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_UNFINISHPAGE_NOAUTOCLOSE



and add the following:
code:

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 05:44

Quote:

Originally Posted by yoachan (Post 2785519)
Thanks for you replies :)

@MSG: RealProgress plugin seems to be a good solution. But when I look into it, I noted this warning:
code:
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 15:16

@MSG: again, thanks for your replies :)

Quote:

Originally Posted by MSG (Post 2785526)
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


All times are GMT. The time now is 17:34.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.