First off I'd like to thank the community for helping me out with this installer. I'm almost done, but I found one problem with my installer.
Just before the "Finish" page is displayed prompting the user to restart, I call a function that does some stuff. I only want that function to be called once, but when the user sees the finish page they have the option of pressing the "Back" button, causing the code to be executed again. Normally I would use a combination of GetDlgItem and EnableWindow to disable it, but I don't know how to have this called once the finish page is loaded. I'm using MUI, and this is what I have that's not working:
!define MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT DisableBackButton
!insertmacro MUI_PAGE_FINISH
. . .
Function DisableBackButton
GetDlgItem $BACK $HWNDPARENT 2
EnableWindow $BACK 0
FunctionEnd I have a couple work-arounds I'm considering.1) Rewrite the Finish Page using InstallOptions, and disabling the back button
2) Make an empty function that's called just before the Finish Page. With any luck the back button will point to this empty function and it will automatically redirect to the finish page. I will test this option and post updates.
I'm sure there's some simple solution to the problem. Any help is greatly appreciated!
Thanks,
Joe