Archive: ifdef and subsections - Please Help


ifdef and subsections - Please Help
Hello,

I am trying to do this:

code:

SubSection "Microsoft Software" SecMicrosoftHeader
!ifdef DO_IE
Section "Internet Explorer" SecInstIE
... blah blah blah
SectionEnd
!endif
Section "Windows Media Player" SecInstWMP
... blah blah blah
SectionEnd
Section "DirectX" SecInstDirectX
... blah blah blah
SectionEnd
SubSectionEnd

explanation:

I'm passing in DO_IE using the /D option via command line. Here is the problem, when DO_IE is globally defined using /D everything works fine. If DO_IE is _not_ globally defined the the Internet Explorer section is not compiled but the subsection is broken. I get three checkboxes, Microsoft Software, Windows Media Player, and DirectX. What I was expecting was to have a SubSection header of Microsoft Software with Windows Media Player and DirectX as options within that SubSection.

Am I doing something wrong? Thanks for any and all help.
Demian


Perhaps there is something else referring to SecInstIE in your script that needs the same ifdef around it.

-Stu


Just Want I Needed
Thank you _very_ much, putting !ifdef around the other occurances of SecInstIE fixed the problem.

Demian