Archive: !define MUI_FINISHPAGE_RUN does not run executable


!define MUI_FINISHPAGE_RUN does not run executable
Hello,
I have to run an executable located in the path $INSTDIR\Bin when setup ends by the define MUI_FINISHPAGE_RUN "$INSTDIR\bin\$8" where $8 is obtained in the installer code by command StrCpy $8 "bin\MyExecutableFile.exe".
But all of this does not work.
I have also tried to use !define MUI_FINISHPAGE_RUN "$INSTDIR\bin\$8" and StrCpy $8 "MyExecutableFile.exe", but it does not work again.

How to fix it ?


$8 may well have changed its value by the time the run command is called. Try using a variable instead of a register.


There are not others $8 variables in the code; I have tried another unique variable ($eseg), but it does not work again.


if $8 is bin\MyExecutableFile.exe, shouldn't it be !define MUI_FINISHPAGE_RUN "$INSTDIR\bin\$8"? is your exe really stored in "$INSTDIR\bin\bin"?!


Originally posted by Yathosho
if $8 is bin\MyExecutableFile.exe, shouldn't it be !define MUI_FINISHPAGE_RUN "$INSTDIR\bin\$8"? is your exe really stored in "$INSTDIR\bin\bin"?!
I have mistyped in my previous message :D.
It is !define MUI_FINISHPAGE_RUN "$INSTDIR\$8" and StrCpy $8 "bin\MyExecutableFile.exe", then this does not work as long as !define MUI_FINISHPAGE_RUN "$INSTDIR\bin\$8" and StrCpy $8 "MyExecutableFile.exe".

The real path is $INSTDIR\bin\MyExecutableFile.exe.
I have also this in the code:

Function .onVerifyInstDir
StrCpy $INSTDIR "$INSTDIR\${Name}"
FunctionEnd

But when I have installed I have not used the default path ${Name}, another folder instead.

Furtherly, I have tried to escape the slash in the path adding another slash or a quote ("bin\\$8" or bin"\$8) but the code yet does not work resulting in the missing launching when setup ends.

Are there any suggestions to let the setup run the application (16 bit) at end ?