|
|
#1 |
|
Junior Member
Join Date: Apr 2008
Posts: 4
|
MUI_FINISHPAGE_RUN default drectory
Hello,
My installation creates a bin drectory in the $INSTDIR and places an executable there. I'd like to run this program using MUI_FINISHPAGE_RUN, but I want the current directory to be $INSTDIR/bin. How do I change the directory? Thanks. |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
use a function as the run "item", then use SetOutPath + Exec
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Apr 2008
Posts: 4
|
Thanks Anders, this is what I did:
!define MUI_PAGE_CUSTOMFUNCTION_PRE ChangeCurDirectory !define MUI_PAGE_CUSTOMFUNCTION_SHOW ChangeCurDirectory !define MUI_FINISHPAGE_RUN "$INSTDIR\bin\my.exe" !insertmacro MUI_PAGE_FINISH Function ChangeCurDirectory SetOutPath "$INSTDIR\bin" FunctionEnd |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
I was talking about MUI_FINISHPAGE_RUN_FUNCTION, your hack relies on undefined behavior (MUI could call SetOutPath after MUI_PAGE_CUSTOMFUNCTION_SHOW )
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Apr 2008
Posts: 4
|
Sorry Anders, I'm new to NSIS could you explain your solution in a little more detail.
Thank you. |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
It (MUI_FINISHPAGE_RUN_FUNCTION) is in the Modern UI documentation.
Stu |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Apr 2008
Posts: 4
|
Thanks Afrow UK! I got it.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|