Archive: Uninstall won't use install language


Uninstall won't use install language
Hi guys,

I am sure I am doing something wrong here, but can't figure out what. I want to use the language chosen during the setup to be used when uninstalling the software.

This is what I am doing:
Windows 2000 Prof. SP 4 (German)
Default language for Setup is German
Install software in English
Uninstall software (Message appears in German)

This is how my script looks like:


...
!include "MUI2.nsh"
...
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
...
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 $(UninstallQuestion) IDYES +2
Abort
FunctionEnd
...


I checked the registry key for remembering the language. It is created.

Does anybody have an idea what I am doing wrong???

Thanks for your help!

Cheers

Byteloser

See this thread:

http://forums.winamp.com/showthread.php?postid=2067967


Thanks for pointing out the thread. I fixed the problem by moving the MessageBox to the un.onGUIInst, but because I am using MUI I had to define the MUI_CUSTOMFUNCTION_UNGUIINIT. My code looks now like this:


...
!define MUI_CUSTOMFUNCTION_UNGUIINIT "un.myUnOnGuiInit"
...
Function un.myUnOnGuiInit

MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 $(UninstallQuestion) IDYES +2
Abort
FunctionEnd

Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd


It is important that the !insertmacro MUI_UNGETLANGUAGE stays within the un.onInit and not be moved to un.onGUIInit!

NSIS is really a great installer and the people helping in the forum just make it perfect.

Cheers!
Byteloser