Ned_Flanders_
23rd January 2004 18:28 UTC
SectionIn 1 2 RO
Hi folks,
I have a problem with useing the .onSelChange Function. all I want is to force the User to Install Internet Explorer 6 when its below Version 5.5.
So I got the GetIEVersion Function for it and everything works gerat instead of pasteing the 'RO' Parameter to the SectionIn Command within my Section Internet_Explorer.
Can somebody please give me an idea how this works?
regards,
Simon
Joost Verburg
23rd January 2004 18:42 UTC
See Include\Sections.nsh.
Use the SetSectionFlag macro with SF_RO.
Ned_Flanders_
23rd January 2004 20:26 UTC
your Post helped me quite a lot on one hand, but I think I have a kind of blocation to find a way to drop the SF_RO Bit to the Section Flag. Maybe you can have a look what I`ve done:
Function checkIE
Push $R1
Push $R2
Call GetIEFullVersion
Pop $7
IntCmp $7 "554134" IEokay IEInstall IEokay
IEInstall:
SectionGetFlags section_Internet_Explorer $R1
IntOp $R2 $R1 & ${SF_RO}
SectionSetFlags section_Internet_Explorer ${SF_RO}
IEokay:
Pop $R1
Pop $R2
FunctionEnd
(dont wonder about the IE Version number, I cur out the dots and the last segment)
Joost Verburg
23rd January 2004 20:38 UTC
As I said, there is an easy macro that adds a flag: SetSectionFlag.
Ned_Flanders_
24th January 2004 14:19 UTC
I see, in Sections.nsh are all Functionalities I need. I there a Example somewhere how to use them? wiht my 20b4 Version nothing happend when I do something like:
!insertmacro SetSectionFlag section_Internet_Explorer ${SF_RO}
I call it in .onInit to check the IE Version before and to set the section_Internet_Explorer RO when its to old. But theres no effect anyway.
kichik
24th January 2004 15:24 UTC
Assuming section_Internet_Explorer is what you've used in the Section line, it is a define. It should therefore be used as ${section_Internet_Explorer}. The way you've used it, it will be translated to 0 because it contains no digits. See Examples\one-section.nsi for an example.
Ned_Flanders_
24th January 2004 15:47 UTC
My Goodness! Its that easy! That hint was a real lifesaver! NSIS rules! I cant imagine I just forgot to take section identifier as variable, unbeliveable. Many many thanks kichik and best regards to this great board at all!
greetings,
Simon