|
|
#1 |
|
Junior Member
Join Date: May 2005
Location: Corvallis - OR, USA
Posts: 13
|
multiple directory selection pages
This is my first day working with NSIS, and I am very impressed with what I have seen so far. I am running into one problem though.
I have a script that prompts the user for the install directory as well as an additional directory. The problem arises when I prompt the user for the second directory. For some reason, it always appends the last portion of the default install directory to the selected path. For example, if default install directory is C:\Program Files\Example1, when the user attempts to select the second directory, something such as C:\Program Files\Example2, the text box that shows what the second directory is will show C:\Program Files\Example2\Example1. Any help would be appreciated! |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Sounds like you've got a back-stroke on the end.
InstallDir "C:\Program Files\Example1" not InstallDir "C:\Program Files\Example1\" -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: May 2005
Location: Corvallis - OR, USA
Posts: 13
|
I don't see where a backslash would be causing the problem. Here is a snippet from the script:
InstallDir $PROGRAMFILES\Company\Product Var DATA_DIR Page license Page directory PageEx directory DirText "Please select the data directory." DirVar $DATA_DIR PageExEnd Page instfiles Function .onInit StrCpy $DATA_DIR "C:\Program Files\data" FunctionEnd When the second directory page is displayed, the path is correct, but if the user clicks the browse button, and selects a directory, "\Product" is always appended and returned in $DATA_DIR |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Mar 2003
Posts: 569
|
The answer is in the User Manual:
http://nsis.sourceforge.net/Docs/Chapter4.html#4.8.1.21 If InstallDir ends with a \ then the installer will stop adding \Product to the selected path |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: May 2005
Location: Corvallis - OR, USA
Posts: 13
|
Thanks for your help. I had tried the backslash, but did not enclose the string in quotes
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|