langstring ignored in .onInit
I am using the mutex detect function to see if my installer is running, which works great, but I want to have the correct language used for the messagebox warning. At the moment the LangString is ignored by the .onInit function, is there a way around this?
I am using 2.0b4.
I have attached an example script so you can see what I'm getting at.
Firewall blocked it, added as code:
LangString InstallerRunning ${LANG_ENGLISH} "English: The installer is already running."
LangString InstallerRunning ${LANG_FRENCH} "French: The installer is already running."
LangString InstallerRunning ${LANG_GERMAN} "German: The installer is already running."
LangString InstallerRunning ${LANG_DUTCH} "Dutch: The installer is already running."
LangString InstallerRunning ${LANG_HEBREW} "Hebrew: The installer is already running."
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "LangString") i .r1 ?e'
Pop $R0
StrCmp $R0 0 +3
MessageBox MB_OK $(InstallerRunning)
Abort
FunctionEnd
edited by kichik, script attached below