Use a combination of IfFileExists and SetOverwrite :
Section "Copy newer files" SetOverwrite ifnewer ; Set flag to owerwrite files only if they are newer than files in output dir IfFileExists $INSTDIR\program.exe FileExists FileDoesNotExist FileDoesNotExist: ; Copy file to output directory SetOutPath "$INSTDIR" File "program.exe" ; Flag from SetOverwrite is applied here FileExists: ; File exists - do nothing ; Continue ... SectionEnd
source share