Archive: new setting for working-directories


new setting for working-directories
hi there.

i'd like to have a new mui-finish-page setting, the working directory of the run-option, something like this:

!define MUI_FINISHPAGE_RUN "C:\abc.exe"
!define MUI_FINISHPAGE_RUN_WORKDIR "C:\"

another possibility would be to let the finish-page autodetect the working-dir out of the run-command.
the point is, that my run-command at the finish-page didn't work, coz the current $OUTDIR wasn't the right working dir.
my workaroung looked like that:
!define MUI_PAGE_CUSTOMFUNCTION_PRE PreFinish
!insertmacro MUI_PAGE_FINISH

Function PreFinish
SetOutPath $INSTDIR
FunctionEnd

but i don't like that.
but that's not the worst. more complicated is the CreateShortcut command. it also uses the $OUTDIR as working-directory. i also had to get a workaround, coz it didn't work correctly:
Function DirChange
Push $OUTDIR
Exch $INSTDIR
Pop $OUTDIR
FunctionEnd
inserted that function before and after the shortcuts.
would be much better to set a parameter for each CreateShortcut command.

could u include those settings/params?


You can also let the checkbox activate a custom function (see Modern UI Readme).


yes, but what about the shortcuts?
couldn't u add an extra parameter to specify the working-dir?

i think, this would be a really usefull option.


What's wrong with using SetOutPath?


it's too uncomfortable and requires more code than one single parameter.
look at my workaroung, i've got to exchange two variables everytime to create shortcuts.


ok, i've got another reason for the new option for the finish-page:
if i use SetOutPath in the pre-function, the readme doesn't show. if i don't, the programm doesn't start.
ok, there's the posibility to call a function, but what do u have against a new !define?


What's wrong with a function? I can't add a define for every small thing, that's the reason why we have these functions.