Archive: using MUI_DIRECTORYPAGE for other purposes?


using MUI_DIRECTORYPAGE for other purposes?
Hi there,
could anyone help me perhaps to find the best way to realize following 'problem'?
While installing I need to ask the users for an additional folder to store some files in. There is no way to read it from the registry (although I could make a guess where the path could be) or find it otherwise. The simplest thing would be, as far as I see, to use the MUI_DIRECTORYPAGE for my purposes.
Unfortunately I have no idea what the simplest way is to change the behaviour of the dialog for my needs. Do I have to recompile or could it be easier with some of theses FindWindow/SendMessage things?

I would be happy to hear from you,
thanks, ASterX


What exactly is the behavior you're trying to achieve? MUI_DIRECTORYPAGE insterts a page which asks for a directory. What do you want to change in it?


Well, by now I realized at least how to change the text of the dialog - that has been my main problem, I don't know why I had not the idea to change strings like one would do for another language (German.nsh).
Three things are still left, I'm sure they also have a simple solution:
· I haven't yet figured out how to tell the DirectoryPage the path which should be the standard at startup without changing the $INSTDIR
· How do I get the chosen directory after/while closing the dialog ?
· Is there a possibility to use the DirectoryPage twice, with different strings ?

Unfortunately I haven't found anything to these topics in the forums.

Thnx AsterX


This thread shows what needs to be done.

BTW, you don't need to change the language files to change certain strings. See the MUI readme for information about changing MUI strings. MUI_DIRECTORYPAGE_TEXT_TOP is probably what you're after.


Thanks, but that is OK - I found the right parts of the documentation, but the other things - I don't come further with them. The installation directory is changed after the DirectoryPage even when I call a function which changes it back to what it should be in MUI_CUSTOMFUNCTION_DIRECTORY_LEAVE and a MessageBox tells me it would be the right path.

I just need a possibility to ask the users for two different folders during the installation where none of them is the installation folder (which is fix).


The thread I linked to shows you how to ask for two different directories. Once you get the second directory page working you can easily get the "first" one to refer to something else than $INSTDIR too.


Sorry, for some reason I didn't notice the link.
I'll have a try, thank you.


After changing to newest NSIS version everything works fantastic, thank you very much.

ASterX