TrifonovS
5th July 2012 08:51 UTC
Runtime change of the Finish page
Hi guys,
I have two options on my Finish page - run the installed application and create shortcuts on the desktop. But in some special cases (it depends of the selected components for installation) I need a possibility to make inactive one or both options. Or better to hide them completely. Is there any way to do this at runtime?
MSG
5th July 2012 09:43 UTC
You can do this in the finish page SHOW function, using the enablewindow command.
TrifonovS
5th July 2012 10:02 UTC
Thanks. But is there a way to deselect the checkbox before to disable it? Can I hide the complete line (checkbox + text)?
TrifonovS
5th July 2012 11:54 UTC
I found solution of all my questions, but it's tricky. I'm not sure if this is the normal way, but it works. Any feedback is appreciated.
So here is what I made:
; Change the tests of the ShowReadme option
SendMessage $mui.FinishPage.ShowReadme ${WM_SETTEXT} 0 "STR:Bla-Bla"
; Deselect the checkbox of the ShowReadme option
SendMessage $mui.FinishPage.ShowReadme ${BM_SETCHECK} ${BST_UNCHECKED} 0
; Make the ShowReadme option inactive
EnableWindow $mui.FinishPage.ShowReadme 0
; Hide the whole ShowReadme option
ShowWindow $mui.FinishPage.ShowReadme ${SW_HIDE}
At the end I left only the last one... because I don't need more...
Afrow UK
5th July 2012 12:37 UTC
That's the correct way. You also have the ${NSD_SetText} and ${NSD_Check}/${NSD_Uncheck} macros which wrap the first two.
(Also your comments on the last two are the wrong way around).
Stu
TrifonovS
5th July 2012 12:55 UTC
Thanks a lot. I also corrected my comments...