Mirakulix
22nd July 2004 10:05 UTC
2 Directory Pages: annoying auto completion
Hello there.
When the user browses in the directory page for an install directory, then 'MyAppName' is automatically appended to the install directory (e.g. c:\program files turns into c:\program files\MyAppName). How can I turn this off?
My scenario is the following.
I want to install files to multiple directories, say
c:\program files\MyAppName and
c:\program files\SomeProgram\plugins\MyPluginName
Of course the user should be able to select the directories, so I have two directory pages.
The second page shows
c:\program files\SomeProgram
and asks the user if this is correct (The right directory is not obvious to the installer since multiple versions of SomeProgram could be installed).
The user can now browse through directories, but if he chooses 'c:\program files\SomeProgram', then 'c:\programme\SomeProgram\MyAppName' appears.
Thanks.
pengyou
22nd July 2004 13:23 UTC
Add a \ to the end of your InstallDir command. For example, change
InstallDir "$PROGRAMFILES\whatever"
to
InstallDir "$PROGRAMFILES\whatever\"
From the description of the InstallDir command (section 4.8.1.20 in NSIS User Manual):
Sets the default installation directory ... Note that the part of this string following the last \ will be used if the user selects 'browse', and may be appended back on to the string at install time (to disable this, end the directory with a \ (which will require the entire parameter to be enclosed with quotes)). If this doesn't make any sense, play around with the browse button a bit.
Mirakulix
22nd July 2004 19:36 UTC
Ok, now I figured out how this works. Setting
InstallDir "$PROGRAMFILES\MyAppName\"
will change the browse button behaviour globally, for all directory pages.
Is there a way to alter the browse button behavour for each directory page seperately?
kichik
22nd July 2004 20:22 UTC
No.
Mirakulix
22nd July 2004 21:49 UTC
Ok, thanks.