Joel
26th June 2003 22:34 UTC
Why this doesn't work?
LangString IEmsg ${LANG_SPANISH} "Tienes una versión $0.x de \
Internet Explorer. $\r$\nSe requiere una versión ${IE}.x o superior \
$\r$\npara visualizar correctamente ${MUI_PRODUCT}."
LangString IEmsg ${LANG_ENGLISH} "You have a $0.x version of \
Internet Explorer. $\r$\nIt Require ${IE}.x o more to run correctly \
${MUI_PRODUCT}."
Function "IEver"
GetDLLVersion "$SYSDIR\shdocvw.dll" $R0 $R1
IfErrors 0 +3
IntOp $R0 $R0 ^
IntOp $R1 $R1 ^
IntOp $R2 $R0 / 0x00010000
IntOp $R3 $R0 & 0x0000FFFF
IntOp $R4 $R1 / 0x00010000
IntOp $R5 $R1 & 0x0000FFFF
IntCmp $R0 ${IE} +2 0 +2
MessageBox MB_OK|MB_ICONSTOP $(IEmsg)
FunctionEnd
It suppose to display to Message according to the select language.
Joel
27th June 2003 00:51 UTC
Ok...
I try everything...
This is really starting to angry-me a little :igor:
Can you analize this test script...
I'm attempting these:
1. Change the Language Dialog strings.
2. Display the MessageBox when the installer detect a lower version
of IE.
deguix
27th June 2003 08:31 UTC
This aren't working, because Banner DLL not support message boxes when are showing the banners.
kichik
27th June 2003 12:46 UTC
Banner has nothing to do with message boxes. The problem is that on .onInit the default language still holds. It's only after .onInit that the language selected by the user is taken into consideration.
Joel
27th June 2003 16:29 UTC
I try it in the "Welcome show" function and is the same:
no response.... :(
Afrow UK
27th June 2003 16:30 UTC
I have an idea that may work.
Have a custom page before the welcome page that shows nothing, but it's leave function contains your script.
-Stu
Joel
27th June 2003 16:31 UTC
I will try that....
[edit]
Yes...
Before Welcome Page, I put a foony custom page.
After selection of th language, it display the messagebox of the
foony function :), can this be a bug?
[/edit]
Afrow UK
27th June 2003 17:05 UTC
I'm guessing that it was not working because the language does not initialise until the first page is shown?
Therefore the function only works after the language initialises by putting a fake page infront.
-Stu ???
Joel
27th June 2003 17:14 UTC
Yes...also one thing that I discover:
The Function:
Function "IEver"
GetDLLVersion "$SYSDIR\shdocvw.dll" $R0 $R1
IfErrors 0 +3
IntOp $R0 $R0 ^
IntOp $R1 $R1 ^
IntOp $R2 $R0 / 0x00010000
IntOp $R3 $R0 & 0x0000FFFF
IntOp $R4 $R1 / 0x00010000
IntOp $R5 $R1 & 0x0000FFFF
IntCmp $R0 ${IE} +2 0 +2
MessageBox MB_OK|MB_ICONSTOP $(IEmsg)
FunctionEnd
was wrong...I changed to:
Function "IEver"
GetDllVersion "$SYSDIR\shdocvw.dll" $R0 $R1
IntOp $R2 $R0 / 0x00010000
IntOp $R3 $R0 & 0x0000FFFF
IntOp $R4 $R1 / 0x00010000
IntOp $R5 $R1 & 0x0000FFFF
;StrCpy $0 "$R2.$R3.$R4.$R5"
IntCmp $R2 ${IE} +2 +1 +2
MessageBox MB_OK|MB_ICONSTOP $(IEmsg)
FunctionEnd
Not too much, but :up: thanks all ...
One question, though:
Can we change the strings of the language dialog "ok" and "cancel"?
kichik
27th June 2003 20:07 UTC
The language selected in .onInit only takes affect after .onInit. I don't know why it didn't work for you in the show function but it works for me. .onGUIInit is probably the best place to put multilingual message boxes.
As for the 0 to +1 change, there is no difference. It has the exact same effect.
You can't translate the OK and Cancel buttons, those are Windows strings.