![]() |
Delay between INSTFILES and FINISHPAGE
Hello,
I wrote a simple install script with no custom pages and no custom .ini files. This is the problem: immediately after all the files have been copied by the INSTFILES page, the "Finish" button becomes available but it takes another 3-4 seconds before the FINISHPAGE appears. This is troublesome because the users may click the Finish button before having a chance to choose whether they want to run the application or not by (un)checking a checkbox I put in the finish page. I also put a secondary checkbox in the finish page that lets the users decide if they want a desktop shortcut or not. I tried messing with these two lines of code putting them here and there but with no results: code: Here is some code inside my install script: code: |
Does it work if you don't use solid compression? Could you attach a complete script reproducing this problem?
|
1 Attachment(s)
Quote:
Quote:
If I build that example as-is, I get 1 second delay. When I add these two lines to make the checkboxes appear: code: the delay increases to 2-3 seconds. I attach my script file but please note that the delay occurs even with the example scripts provided with the NSIS installation. You may not be able to notice the delay if you have a fast CPU. Mine is a 1 Ghz AMD Duron and the delay is pretty evident. If I can give my opinion, this is all due to the fact that the Finish button is set to "enabled" on the "INSTFILES Page Unload" event rather than on the "FINISHPAGE Page Loaded" event. Here's a recap of what's going on. Step #1: Files are being copied. Note that all the buttons are disabled during this phase. http://www.doppioslash.it/misc/nsis/step1.gif Step #2: All files have been copied. Immediately, the Finish button becomes enabled. The Cancel button is still disabled!! The finish page won't appear for another 2-4 seconds. http://www.doppioslash.it/misc/nsis/step2.gif Step #3: The finish page finally appears. This is the moment when the Cancel button becomes enabled. The whole problem would be solved if you also enabled the Finish button at this time, not earlier. http://www.doppioslash.it/misc/nsis/step3.gif Thanks for support. |
The Installer Attributes AutoCloseWindow doesn't help?
Nor User Interface Instructions SetAutoClose? |
Quote:
Also tried to set them to false but that didn't solve the problem either. After all the files have been installed, the user clicks "Next >" and the history repeats. The finish button appears immediately, the finish page after 2-3 seconds. |
Custom pages use INI files, which are not the fastest method of data management available. However, 2-3 seconds even in the simplest case is not normal. I'd take a wild guess and say you have an anti-virus that's getting in your way.
|
It is true that my PC is slow and seriously needs a format C:, but the point is:
- I can't predict the computer specs my users will run the installer on; - The Cancel button gets enabled at the right time, why the Finish button doesn't? I'd like to point out that, of course, this is just a minor problem. In the end, if there is no solution, It won't really matter :) |
1 Attachment(s)
Hmm... what about setting up a custom page just before the InstFiles page in order to collect info about shortcuts (see image below about what I mean) and leave the finish page only with run 'myapp.exe'? As you noticed above, that'd decrease the delay to 1 sec...
|
I'm gonna try that soon, thanks for the advice.
|
Quote:
|
I added 2 custom functions (PRE and SHOW) on Finish Page.
As I'm not able to reproduce the refered problem in my machine, I added a sleep in the PRE function in order to simulate the problem. When there is only the sleep command in the PRE function the next button appears while the FInish Page does not appear. Then I added code to disable the button and enable it again in SHOW function. Could these 2 functions solve the refered by BrightSoul problem? code: the functions (sleep serves the simulation purpose) code: |
Awesome!
Thank you Red Wine, that did the trick. Also, I submitted a bug report as suggested by kichik. Happy new year everyone! :) Thanks for the great support- |
You're welcome! Nothing impossible when you're NSIS-ing :-)
Happy new year to you too! Happy new year amici Italiani! |
| All times are GMT. The time now is 04:35. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.