Archive: Installer does not throw error if the Folder Name contains wild cards


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?


You can use MUI_DIRECTORYPAGE_VERIFYONLEAVE and GetInstDirError to use your own error handling on the directory page.


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


$INSTDIR is always filtered. You can get the selected directory directly from the UI (GetDlgItem, System::Call GetWindowText, etc.) and test that.