Disable buttons, do some processing and re-enable buttons
Hi !
I'm currently writing a quite complex installer. I proprose some choices to the user, each choice proprosed through a single separate page. I currently process each choice when the user clicks the "next" button of the corresponding page. However the processing can be long (I extract files from a zip archive via the nsisunz plugin).
However I discovered that I could click the "next" button while the processing was in progress (NSIS currently in the nsisunz extracting function). So it seems like if I was able to launch the extraction twice... and the whole application crashes on a Windows fatal error.
I thought I would be able to disable the buttons, extract everything and then enable them. I found how to do it in this forums. However it seems it doesn't work in my case. The buttons get disabled when using as "disable/enable buttons -> exit function" but they don't when using as "disable buttons -> call nsisunz -> enable buttons -> exit function". It seems that the window messages aren't handled (I suppose they are handled when I exit the function... too late).
A solution would be to collect all choices and then have a progress page (all buttons would be disabled in the PRE function). Then, when the processing would be finished, they would be re-enabled. However this would require me to rewrite some big parts of my installer script.
Does anybody know how I could handle this problem ?
Thansk forward,
Seb