Archive: Language selection gone!!!


Language selection gone!!!
hi,
after some changes made to my installation file, the language selection is gone... but I certainly didn't modify this part of the script!!!

Here it is:

; Script generated by the HM NIS Edit Script Wizard.

; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Codecs"
!define PRODUCT_VERSION "1.25"
!define PRODUCT_PUBLISHER "cirerita"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"

; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "burros3b.ico"
!define MUI_UNICON "burros3b.ico"

; Language Selection Dialog Settings
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "contrato-readme.txt"
; Components page
!insertmacro MUI_PAGE_COMPONENTS
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Start menu page
var ICONS_GROUP
!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Codecs"
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "Catalan"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "English"

; MUI end ------


Delete HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Codecs\NSIS:Language.


can't find that string. is this one:

!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"


ooops, you meant delete in Windows registry or in NSIS script???


In Windows registry.


thanks, it worked! by the way, is that normal? I mean, will it happen again whenever I modify the NSIS script?


It will happen again once you install your program again. That's what MUI_LANGDLL_REGISTRY_* are for. From the documentation:

The registry key to store the language. The users preference will be remembered. You can also use it for the uninstaller to display the right language. Don't forget to remove this key in the uninstaller.

so, is it any better to simply delete this:

!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"


Might be better to use


!define 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. (MUI Readme)

ok, thanks, I'll add that entry...