Detect skipped file
In one of my patch installers, using NSIS 2.9, I need to copy in an updated file and then execute that file. I would like to skip the execution if the file replacement was skipped (already up-to-date). I found a mention in the forum that the error flag would be set if the file was skipped. My code fragment is as follows:
SetOverwrite ifnewer
ClearErrors
File "SETUPEX.EXE"
IfErrors +4 0
ExecWait "$INSTDIR\SETUPEX.EXE"
IfErrors 0 +2
SetRebootFlag true
I find however that ExecWait is always being called, even when the file has been skipped, so I am assuming that the error flag is not being set. Is there any other way to determine if the file was skipped so I can skip the execution ?