Skip to content
⌘ NSIS Forum Archive

Installation Directory issue

7 posts

JamesKiller#

Installation Directory issue

During the installation, when it comes to the window where the installer will ask users to enter destination folder. Our default is $INSTDIR\$Proudct_Name, the issue comes when users type in such as G:\ProductName (but there is no G: driver on the machine at all) since it is an editable textbox.
Then click on install button, it will say, we can't wrtie the file, balah,balah......

how to control this?


James
Red Wine#
Are you referring on the standard directory page, or a custom page with directory request control?
Because on the standard directory page when you type an invalid drive the install button is disabled at once.
Red Wine#
You need to validate the destination path into the custom page's leave function, I'd suggest ${DirState}, see nsis manual http://nsis.sourceforge.net/Docs/AppendixE.html#E.1.20
JamesKiller#
BTW, how to get the directoy the users typed in the textbox and how to disable the next button.?
Thank you..
Red Wine#
As I mentioned above on custom page's leave function, you get the state of the control. See included examples into Examples\InstallOptions.