Archive: Problem with LANGDLL


Problem with LANGDLL
  I use the following macros in my NSIS script:


"WinCD"


>;-------------------------------
;Language Settings

>!define MUI_LANGDLL_REGISTRY_ROOT "HKLM"
>!define MUI_LANGDLL_REGISTRY_KEY "Software\${FOLDERNAME}"
>!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"

>;always show language selection dialog
>!define MUI_LANGDLL_ALWAYSSHOW
>
But unfortunately it also asks for the language if I start the uninstaller, because it doesn't even store the selected value in the registry. In other NSIS versions it worked without problems.

Please help.
Thanks Konrad

It is doing what you have told it to do, that is what MUI_LANGDLL_ALWAYSSHOW is supposed to do. From the MUI docs:

MUI_LANGDLL_ALWAYSSHOW
Always show the language selection dialog, even if a language has been stored in the registry. The language stored in the registry will be selected by default.

But in older versions this only means, if I start a new installer then it displays the language selection dialog. In the uninstaller it took always the language of the installer, because it makes no sense running the uninstaller in another language than the installer.

How can I accomplish that behaviour with the new version?
Konrad


Works fine for me.

The language is stored after the installation has been completed, so a wrong language choice won't give any problems.

Therefore, you have to complete the installation before the key will be written.


Found the problem
  As I moved the installer language setting to the beginning of the script as in your example it works.
You should change that in you readme, because there the setting made after the pages. For me that doesn't work. The installer doesn't create a language setting key in the registry. It only works if you define it before the pages.

regards
Konrad


That's not true. It should only be before MUI_LANGDLL_DISPLAY.


But in my script it is that way I told you:
As soon as I move the language setting after the pages section, it doesn't store the value in the registry.
I also tried to define MUI_ICON after the pages section but then the compiler says, that MUI_ICON is already defined. Moving MUI_ICON above the pages section als fixes that problem.

Perhaps I can send you the NSIS-file that you can check it out for yourself. Because I don't want to post it in the forum, please send me your e-mail address.

Regards
Konrad


I'm sorry, I misunderstood. It's indeed right that the LangDLL registry settings should be before the instfiles page. I'll fix that in the Readme.