Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 26th September 2005, 16:18   #1
rafeeq
Junior Member
 
Join Date: Sep 2005
Posts: 2
Installer does not throw error if the Folder Name contains wild cards

I have used MUI_PAGE_DIRECTORY macro from MUI.nsh in my installer to choose Destination Folder. If I have included wild cards in my Destination Folder,Installer just avoids it from the Destination Folder Name. For eg) If I give
ab??**cd as my Destination folder, installer creates a directory abcd. How can I change this behavior so that Installer throws an error message which says wild cards are not allowed for Destination Folder Name?
Attached Images
File Type: jpg nsis.jpg (27.9 KB, 155 views)
rafeeq is offline   Reply With Quote
Old 27th September 2005, 15:50   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You can use MUI_DIRECTORYPAGE_VERIFYONLEAVE and GetInstDirError to use your own error handling on the directory page.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 30th September 2005, 11:42   #3
rafeeq
Junior Member
 
Join Date: Sep 2005
Posts: 2
Thanks a lot. But GetInstDirError doesnt seems return an error if we select a folder name with wild cards like "abcd**??ef".

Then I tried to write a similar function and found an issue.

Even if $INSTDIR="abcd**??ef"
When I do "StrCpy $0 $INSTDIR" , $0=="abcdef" instead of "abcd**??ef".

Could you please tell what can be the problem.

Thanks in Advance
rafeeq is offline   Reply With Quote
Old 30th September 2005, 11:48   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
$INSTDIR is always filtered. You can get the selected directory directly from the UI (GetDlgItem, System::Call GetWindowText, etc.) and test that.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik 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