Tmort
15th February 2005 15:42 UTC
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
kichik
15th February 2005 19:38 UTC
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.
Tmort
15th February 2005 20:54 UTC
Page run
Thanks,
I set up a batch file to call on that runs the program
ImmortAlex
16th February 2005 05:05 UTC
You can use
!define MUI_FINISHPAGE_RUN_FUNCTION myFunc
Function myFunc
ExecShell "open" "$INSTDIR\mydb.mdb"
FunctionEnd
I think it's more correct way.