JamesKiller
12th February 2007 20:39 UTC
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
12th February 2007 20:51 UTC
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.
JamesKiller
12th February 2007 22:25 UTC
oh. I found it is on a custom page!.... how to do it?
JamesKiller
12th February 2007 22:46 UTC
how to add this driver validation on custom page?
Red Wine
12th February 2007 22:53 UTC
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
12th February 2007 22:58 UTC
BTW, how to get the directoy the users typed in the textbox and how to disable the next button.?
Thank you..
Red Wine
12th February 2007 23:10 UTC
As I mentioned above on custom page's leave function, you get the state of the control. See included examples into Examples\InstallOptions.