Archive: Checkboxes, after install function and app launch??


Checkboxes, after install function and app launch??
I'm pulling my hair out, I can't figure why this isn't working.

I want to have 3 checkboxes on my final screen, one to run my app and two others which store data to a file.

If I add MUI_FINISHPAGE_RUN to finish page my function doesn't get called and it doesn't launch my program, but if I don't add it it says "install function write_run" not referenced.

I've actually tried manually adding the checkbox for the run option myself...

Help!

; Finish page
!define MUI_PAGE_CUSTOMFUNCTION_PRE fin_checkboxes
!define MUI_PAGE_CUSTOMFUNCTION_SHOW fin_show
!define MUI_FINISHPAGE_RUN_FUNCTION write_run
!insertmacro MUI_PAGE_FINISH

Function write_run
SetOutPath "$INSTDIR"
ReadINIStr $1 "$PLUGINSDIR\iospecial.ini" "Field 7" "State"
ReadINIStr $2 "$PLUGINSDIR\iospecial.ini" "Field 8" "State"
FileOpen $0 $INSTDIR\settings.dat" w
FileWrite $0 'one=$1$\r$\n'
FileWrite $0 'twu=$2$\r$\n'
FileClose $0
ReadINIStr $MUI_TEMP1 "$PLUGINSDIR\ioSpecial.ini" "Field 6" "State"
StrCmp $MUI_TEMP1 "1" 0 mui.finish_norun
StrCpy $MUI_TEMP1 "$\""$INSTDIR\myprog.exe"$\""
Exec "$MUI_TEMP1"
mui.finish_norun:
FunctionEnd


Hope someone can help :(

You already have a thread about this problem, please don't post things twice. (And please, often it's better to edit the existing post, rather than to keep replying to your own thread...)


Well I didn't get a reply, I thought if I rephrased the question. :(

EDIT: I have added to the threads and go no reply either.


I'll agree that this thread has been phrased more clearly. So since it's already on top anyway, I'll reply here.

MUI_FINISHPAGE_RUN_FUNCTION defines the function that is called only when the RUN checkbox is ENABLED. So if you enable checkboxes 1&2, but not checkbox Run, the function will not be called. If you want to process all three checkboxes properly, use the page's leave function instead.


Thanks, that fixed it.