dbach
17th May 2006 11:17 UTC
!if isn't working correctly?
Hi there.
I have a problem with an Plugin (HwInfo) and the values I got returned.
E.g. I am asking for the System-memory. Its 1024.
Now I wrote a little .onInit function:
HwInfo
::GetSystemMemory
StrCpy $R0$0
MessageBox MB_OK $R0
!if 1500 < $R0
Detailprint "This system has less memory as required!"
MessageBox MB_YESNO "This system has $R0 MB Memory but 1500 MB is at least required. Continue Installation?" IDYES GetSystemMemoryEnd IDNO +1
Abort
!else
Detailprint "System has $R0 Memory"
!endif
But this section is never called. But 1024 IS smaller then 1500. Does this make any sence?
Red Wine
17th May 2006 12:08 UTC
use LogicLib.nsh for ${If} ${Else} etc statement
dbach
17th May 2006 13:10 UTC
Originally posted by Red Wine
use LogicLib.nsh for ${If} ${Else} etc statement
Thanks Red Wine. I will try it. Is the non-working !if a known bug or just a mistake of usage by myself?
Comperio
17th May 2006 14:09 UTC
!if is a compile-time statement, not a runtime statement.
In other words, it's only used by the compiler and not by the actual setup program.
dbach
17th May 2006 15:37 UTC
Originally posted by Comperio
!if is a compile-time statement, not a runtime statement.
In other words, it's only used by the compiler and not by the actual setup program.
Ah, didn't saw that. Thanks a lot.
dbach
19th May 2006 08:51 UTC
Once again, thanks for you help folks!
:)