Archive: MUI Page Finish - running an app


MUI Page Finish - running an app
I'm just trying to run an application when the checkbox to run it is checked on the MUI Finish page. It's not an exe it's a Windows application. I've specified the file on the MUI_Finishpage_run and I've also added a line to execute for the MUI_Page_Finish macro

; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\mydb.mdb"
!insertmacro MUI_PAGE_FINISH
!execute "$INSTDIR\mydb.mdb"

The app doesn't open??

Can anyone help.

Thanks


Use MUI_FINISHPAGE_SHOWREADME instead of MUI_FINISHPAGE_RUN. If it's not an executable, it can't be executed. It needs to be opened by the shell, and that's exactly what MUI_FINISHPAGE_SHOWREADME does.

!execute is a compile time instruction and has nothing to do with opening the file on the user's machine.


Page run
Thanks,

I set up a batch file to call on that runs the program


You can use

!define MUI_FINISHPAGE_RUN_FUNCTION myFunc
Function myFunc
ExecShell "open" "$INSTDIR\mydb.mdb"
FunctionEnd

I think it's more correct way.