rafeeq
26th September 2005 17:18 UTC
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?
kichik
27th September 2005 16:50 UTC
You can use MUI_DIRECTORYPAGE_VERIFYONLEAVE and GetInstDirError to use your own error handling on the directory page.
rafeeq
30th September 2005 12:42 UTC
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
kichik
30th September 2005 12:48 UTC
$INSTDIR is always filtered. You can get the selected directory directly from the UI (GetDlgItem, System::Call GetWindowText, etc.) and test that.