Archive: MUI_INNERDIALOG_TEXT creates unwanted path


MUI_INNERDIALOG_TEXT creates unwanted path
Hello there,

my setup should include a page for requesting a certain path.

I use following code:

!define MUI_PAGE_CUSTOMFUNCTION_SHOW DataDirectoryShow
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DataDirectoryLeave

Function DataDirectoryShow

!insertmacro MUI_HEADER_TEXT $(DIRDATAHEADER) $(DIRDATA)
!insertmacro MUI_INNERDIALOG_TEXT 1041 $(DIRDATAFOLDER)
!insertmacro MUI_INNERDIALOG_TEXT 1019 $(DIRDATAFOLDERDEFAULT)
!insertmacro MUI_INNERDIALOG_TEXT 1006 $(DIRDATAHELP)

FunctionEnd

Function DataDirectoryLeave

StrCpy $DataDir $INSTDIR

FunctionEnd

So the user has to set a path, whereas a certain default path is going to be shown: C:\AppData

Now, if the user changes the path to D:\AppData manually, everything works find. But if the user changes the path via "Browse" dialog, the path is going to be undesirably extended by another sub directory. So if the user clicks to D:\AppData in the Browse dialog, in the text box will be shown following path: D:\AppData\[AnotherSubDirectory].

I don't want to have that senseless sub directory. How can I configure the NSIS script that kind, that no extensions will be made on the browsed path?

Robert


This has nothing to do with MUI_INNERDIALOG_TEXT, it's standard NSIS behavior. Append a backslash to your InstallDir if you want to disable it.