Old 12th February 2007, 19:39   #1
JamesKiller
Senior Member
 
Join Date: Jan 2007
Posts: 125
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
JamesKiller is offline   Reply With Quote
Old 12th February 2007, 19:51   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
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.

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 12th February 2007, 21:25   #3
JamesKiller
Senior Member
 
Join Date: Jan 2007
Posts: 125
oh. I found it is on a custom page!.... how to do it?
JamesKiller is offline   Reply With Quote
Old 12th February 2007, 21:46   #4
JamesKiller
Senior Member
 
Join Date: Jan 2007
Posts: 125
how to add this driver validation on custom page?
JamesKiller is offline   Reply With Quote
Old 12th February 2007, 21:53   #5
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
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

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 12th February 2007, 21:58   #6
JamesKiller
Senior Member
 
Join Date: Jan 2007
Posts: 125
BTW, how to get the directoy the users typed in the textbox and how to disable the next button.?
Thank you..
JamesKiller is offline   Reply With Quote
Old 12th February 2007, 22:10   #7
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
As I mentioned above on custom page's leave function, you get the state of the control. See included examples into Examples\InstallOptions.

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump