Old 4th July 2011, 11:48   #1
yoachan
Junior Member
 
Join Date: Jul 2011
Posts: 8
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
yoachan is offline   Reply With Quote
Old 4th July 2011, 14:04   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Add a hidden Section at the end (no name).

Stu
Afrow UK is offline   Reply With Quote
Old 5th July 2011, 03:35   #3
yoachan
Junior Member
 
Join Date: Jul 2011
Posts: 8
@Afrow: Thanks for your reply....

Quote:
Originally Posted by Afrow UK View Post
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....
yoachan is offline   Reply With Quote
Old 5th July 2011, 05:20   #4
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
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." >_>
MSG is offline   Reply With Quote
Old 5th July 2011, 06:07   #5
yoachan
Junior Member
 
Join Date: Jul 2011
Posts: 8
@MSG: Thanks for your reply

Quote:
Originally Posted by MSG View Post
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...?
yoachan is offline   Reply With Quote
Old 5th July 2011, 06:28   #6
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Well you can add the Nop command a hundred times... Or just use the RealProgress plugin.
MSG is offline   Reply With Quote
Old 5th July 2011, 10:05   #7
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
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 is offline   Reply With Quote
Old 6th July 2011, 04:43   #8
yoachan
Junior Member
 
Join Date: Jul 2011
Posts: 8
Thanks for you replies

Quote:
Originally Posted by MSG View Post
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 View Post
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
yoachan is offline   Reply With Quote
Old 6th July 2011, 05:44   #9
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by yoachan View Post
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
MSG is offline   Reply With Quote
Old 6th July 2011, 15:16   #10
yoachan
Junior Member
 
Join Date: Jul 2011
Posts: 8
@MSG: again, thanks for your replies

Quote:
Originally Posted by MSG View Post
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
yoachan is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump