Hello,
I want have two install-Dirs, that are editable by the user.
One part of Software should be installt to
c:\xxxxxx
the other part to
d:\yyyyyy
Both pathes must be overrideable by the user.
Is there any example available?
Thanks
Peter
two installDirs possible ?
7 posts
simply add a PagEx of type directory to your installer:
PageEx directory
DirText $(EXTRADIR_CAPTION)
DirVar $EXTRA_DIR
PageExEnd
then in .onInit you can read the values from previous installations or set to default like these:
Function .onInit
; this is the for the standard dir page
StrCpy $INSTDIR "$PROGRAMFILES\Myprg\"
; this is for the extra page
StrCpy $EXTRA_DIR "$PROGRAMFILES\Extra\"
FunctionEnd
hope this helps
PageEx directory
DirText $(EXTRADIR_CAPTION)
DirVar $EXTRA_DIR
PageExEnd
then in .onInit you can read the values from previous installations or set to default like these:
Function .onInit
; this is the for the standard dir page
StrCpy $INSTDIR "$PROGRAMFILES\Myprg\"
; this is for the extra page
StrCpy $EXTRA_DIR "$PROGRAMFILES\Extra\"
FunctionEnd
hope this helps
Or if you are using Modern UI, simply add !define MUI_DIRECTORYPAGE_VARIABLE $Var before your second MUI_PAGE_DIRECTORY insertion.
Stu
Stu
I would like to use the modern Interface.
The hint to use a second Page is working well.
But is it also possibble to input both
directories on ONE page?
This would be easier for the user.
Thanks for help
Peter
The hint to use a second Page is working well.
But is it also possibble to input both
directories on ONE page?
This would be easier for the user.
Thanks for help
Peter
You'd need to build a custom page with 2 DirRequest fields.
Three directories...
I had to do this for our installer too. Except we had three locations.
It's quite easy if you use Eclipse and the NSIS plug-in for Eclipse - it's very good and lets you draw custom pages (like you might do in MS visual studio).
I had to do this for our installer too. Except we had three locations.
It's quite easy if you use Eclipse and the NSIS plug-in for Eclipse - it's very good and lets you draw custom pages (like you might do in MS visual studio).
Hello!
I have a follow-up question:
I have also two parts of the software which should go in different directories. But one part is optional, so the second DirPage should only be shown when the section is choosen in the ComponentPage.
How to make that?
mfg
chris
I have a follow-up question:
I have also two parts of the software which should go in different directories. But one part is optional, so the second DirPage should only be shown when the section is choosen in the ComponentPage.
How to make that?
mfg
chris