create a form that allows the installer to change setoutpath
How do i create a form that allows the Installer to change the output path of each option selected?
10 posts
Should work nicely 🙂
Var Outpath1
Var Outpath2
PageEx directory
DirVar $Outpath1
DirText "Choose Install Location for Section 1" "Setup will install \
Section 1 to the following folder$\r$\n$\r$\nTo install to a different \
folder, click Browse and select another folder." "" ""
PageCallbacks directory1_Pre "" ""
PageExEnd
Function directory1_Pre
SectionGetFlags ${Section1} $R0
StrCmp $R0 1 +2 ;Section 1 is selected
Abort
FunctionEnd
PageEx directory
DirVar $Outpath2
DirText "Choose Install Location for Section 2" "Setup will install \
Section 2 to the following folder$\r$\n$\r$\nTo install to a different \
folder, click Browse and select another folder." "" ""
PageCallbacks directory2_Pre "" ""
PageExEnd
Function directory2_Pre
SectionGetFlags ${Section2} $R0
StrCmp $R0 1 +2 ;Section 2 is selected
Abort
FunctionEnd
Section "Section 1" Section1
SetOutPath "$Outpath1"
File "blah.txt"
SetOutPath "$Outpath1\otherblah"
File "otherblah.txt"
SectionEnd
Section "Section 2" Section2
SetOutPath "$Outpath2"
File "grky.txt"
SetOutPath "$Outpath2\othergrky"
File "othergrky.txt"
SectionEnd