Archive: can i prohibit NSIS to create registry value NSIS:Language


can i prohibit NSIS to create registry value NSIS:Language
Hi,

i have a problem with the NSIS Installer. After installation, the installer creates a registry value "NSIS:Language" in the uninstall key "Software\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)".
Can i prohibit NSIS this behavior?

I tried to delete the registry key in a section, but after that the installer creates it again :(

Regards
Markus


Just remove the corresponding lines from your script


there are no lines i can remove.
No lines with writeRegStr and NSIS:Language.


You are probably using the MUI_LANGUAGE_REGISTRY* defines?

Stu


no i don't use this defines. I use a macro, another person wrote from my team months ago.
It looks like:

; 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"

!macro HOBI_MUI_LANGDLL_DISPLAY

!verbose push
!verbose ${MUI_VERBOSE}

!ifdef NSIS_CONFIG_SILENT_SUPPORT
IfSilent mui.langdll_done
!endif

!insertmacro MUI_DEFAULT MUI_LANGDLL_WINDOWTITLE "Installer Language"
!insertmacro MUI_DEFAULT MUI_LANGDLL_INFO "Please select the language you would like to use during the installation."

!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME

ReadRegStr $MUI_TEMP1 "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
StrCmp $MUI_TEMP1 "" mui.langdll_show
StrCpy $LANGUAGE $MUI_TEMP1
!ifndef MUI_LANGDLL_ALWAYSSHOW
Goto mui.langdll_done
!endif
mui.langdll_show:

!endif

LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" A ${MUI_LANGDLL_PUSHLIST} ""

Pop $LANGUAGE
StrCmp $LANGUAGE "cancel" 0 +2
Abort

!ifdef NSIS_CONFIG_SILENT_SUPPORT
mui.langdll_done:
!else ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
mui.langdll_done:
!endif

!verbose pop

!macroend

---------------------------
it's not the whole script but that part called in the .onInit function.

Regard
Markus


Sorry they're MUI_LANGDLL_REGISTRY defines and you do have them defined.

Stu


Thx Afrow UK!


For future reference, although you are using MUI_LANGDLL_REGISTRY_ROOT etc in your script to read from the registry, MUI is using them to write to the registry internally because they have been defined.

Stu