I have something like that:
It works fine, except that the main file, "${EXE}", is calculated twice in the file size of the section. I thought there's maybe a flag for "File" to exclude it from size calculation, but I didn't find any.
Section "$(STRING_SECTION_MAIN)" SecMain
SectionIn 1 RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
${If} $Portable == 0
File "/oname=1.exe" "${EXE}"
; Write the installation path into the registry
WriteRegStr HKCU "Software\test" "install_dir" "$INSTDIR"
${Else}
File "/oname=bin\1.exe" "${EXE}"
File "/oname=launcher.exe" "${LAUNCHER}"
${EndIf}
SectionEnd
Thanks.