This is the current relevant script code:
Edit: I found this but I don't understand it clearly. My knowledge of code is all self taught, so I am not very proficient here:Function .onInit
ReadRegStr $R0 HKLM \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${MOD_LOC}" \
"UninstallString"
StrCmp $R0 "" done
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
"${NAME} is already installed. $\n$\nDo you wish to uninstall?" \
IDOK uninst
Abort
;Run the uninstaller
uninst:
ClearErrors
Exec $INSTDIR\Mods\${MOD_LOC}\Uninstall.exe
done:
FunctionEnd
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
!define MUI_UNABORTWARNING
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
!define MUI_HEADERIMAGE
ShowInstDetails show
ShowUninstDetails show
;--------------------------------
;Pages