OK, I'm trying to create a loop for this, so it loops through and propogates the sections with the names, descriptinos, and locations of the files.
This is the code so far for the whole program:
Var number
Var number2
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Setup.exe"
InstallDir "$PROGRAMFILES\MATY Auto Updater"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
Function .onInit
ReadINIStr $0 $EXEDIR\settings.ini Sec$number Name
SectionSetText SEC$number2 $0
FunctionEnd
Section "" SEC01
ReadINIStr $1 $EXEDIR\settings.ini Sec00 Location
NSISdl::download $1 $exedir\temp\$0.zip
CreateDirectory $INSTDIR\abortbedmaking
SectionEnd
Section "" SEC02
ReadINIStr $1 $EXEDIR\settings.ini Sec01 Location
NSISdl::download $1 $exedir\temp\$0.zip
CreateDirectory $INSTDIR\abortbedmaking
SectionEnd
Section "" SEC03
ReadINIStr $1 $EXEDIR\settings.ini Sec02 Location
NSISdl::download $1 $exedir\temp\$0.zip
CreateDirectory $INSTDIR\abortbedmaking
SectionEnd
Section -Extract
IfFileExists $exedir\temp\abortbedmaking.zip a b
a:
nsisunz::UnzipToLog "$exedir\temp\abortbedmaking.zip" "$instdir\abortbedmaking"
Pop $0
StrCmp $0 "success" b
DetailPrint "$0" ;print error message to log
b:
SectionEnd
Section -Post
Sleep 5000
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\AppMainExe.exe"
Delete $exedir\temp\*.*
SectionEnd
; Section descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
ReadINIStr $2 $EXEDIR\settings.ini Sec00 Description
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $2
!insertmacro MUI_FUNCTION_DESCRIPTION_END
-Data