A simple GOTO condition. But howto ?
Hello Guys,
I would like to add a GOTO into my program with a simple condition IF – ELSE.
Here is a very simple code who I do not understand why it is not functional:
Outfile “ConditionGoto”
Section "Step1"
;Example with a basic condition – read a rek key
ReadRegStr $0 HKLM "Software\7-Zip" "Path"
DetailPrint "$0"
!If $0 == "Lotus Notes 8.52 FP2"
ExecWait "$SYSDIR\Notepad.exe"
DetailPrint "Hello I’m Notepad !"
!Else
DetailPrint "Condition Step1 KO !"
Goto .OK
!EndIf
SectionEnd
Section "Step2"
ExecWait "$SYSDIR\mspaint.exe"
DetailPrint "I’m Paint !"
SectionEnd
Section "CallOK"
.OK:
DetailPrint "Your are in Goto World !
ExecWait "$SYSDIR\calc.exe"
Quit
SectionEnd
For me If condition step1 is OK, notepad start, then paint and calc. Right ?
If step1 is KO, only calc start and the script close.
But is it not right :/