Archive: Installation Directory issue


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


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.


oh. I found it is on a custom page!.... how to do it?


how to add this driver validation on custom page?


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


BTW, how to get the directoy the users typed in the textbox and how to disable the next button.?
Thank you..


As I mentioned above on custom page's leave function, you get the state of the control. See included examples into Examples\InstallOptions.