Skip to content
⌘ NSIS Forum Archive

!ifdef problems, big problems

2 posts

empezar#

!ifdef problems, big problems

Hello I have a script that kinda looks like this:

Section Blabla

!define USE_BLABLA

...blabla...

EndSection

Section Blabla2

!ifdef USE_BLABLE
.. do this ..
!else
.. do something else ..
!endif

EndSection

---

The problem is, it always does ".. do this ..", even if I uncheck the Blabla Section. What's up with that?!
Afrow UK#
!define, !ifdef is for compile time not run time.

You need to use a variable and store a boolean (ie 0 or 1) in it (by using StrCpy). Then use StrCmp to check it in your second section.

-Stu