Skip to content
⌘ NSIS Forum Archive

Problems with function and section

4 posts

CyberSpace#

Problems with function and section

I want to read a string from the Registry. If the string exist, then copy File1 to the InstallDir. If the string not exist then copy File2 to the InstallDir. The Problem is, that a section must be outside of a function and a Goto label inside of a function. How can I make it ?
kichik#
Call the function from the section or just do the reg reading and copying from within the section.

KiCHiK
kichik#
Sure

Section bla
  RegReadStr $1 HKLM "Software\Whatever" "Bla"
  StrCmp $1 "" doesNotExist
    File exists.bla
    Goto done
  doesNotExist:
    File doesNotExist.bla
  done:
SectionEnd 
KiCHiK