|
|
#1 |
|
Junior Member
Join Date: Jun 2007
Posts: 4
|
customizing install directory
Hi, I have too mutually exclusive options to install application. Let's say they are KEEDS and TEENS.
Here it is piece of installer script: Section "Kids" KIDS ... SectionEnd Section /o "Teens" TEENS ... SectionEnd Function .onInit StrCpy $1 ${KIDS} ; Kids is selected by default FunctionEnd Function .onSelChange !insertmacro StartRadioButtons $1 !insertmacro RadioButton ${KIDS} !insertmacro RadioButton ${TEENS} !insertmacro EndRadioButtons FunctionEnd InstallDir "$PROGRAMFILES\MyProgram" I want to set installation dir depends on choosen option either "$PROGRAMFILES\MyProgram.kids" or "$PROGRAMFILES\MyProgram.teens" How to do that? Thanks. |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Just check the value of $1 in the page's leave function:
code: Stu |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2007
Posts: 4
|
Thanks a lot!
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jun 2007
Posts: 4
|
Additional but related question about Uninstall section. Let's assume code written above gives us customized name of application folder stored in $name variable. And I create shortcuts etc using that name:
CreateShortCut "$DESKTOP\$name.lnk" "$INSTDIR\MyProgram.exe" Question is how to say Uninstaller to delete correctly this shortcut. Following code in Uninstall section doesn't work: Delete "$DESKTOP\$name.lnk" How to handle uninstall correctly in this case? Thanks. |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jun 2007
Posts: 4
|
Thanks. I managed to solve the issue using method GetAfterChar described on http://nsis.sourceforge.net/Get_last...tory_path_part
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|