How can I check with NSIS whether a file is older than that file to install? I only want to overwrite older files.
Robert
Overwrite only older files
5 posts
Currently I'm also going through this issue. At present I'm using the following commands:
first declare the variables:
Var Out1
Var Out2
Var Out3
Var BundledExe1 ; this for ur bundled exe in installer
storing my bundled exe's version in variable BundledExe1
StrCpy $BundledExe1 "5.166.0.29"
;now fetch ver.info of user's exsisting exe say user.exe
${GetFileVersion} '$INSTDIR\user.exe' $OUT2
;now go for version compare:
; $OUT3=0 Versions are equal
; $OUT3=1 Version1 is newer
; $OUT3=2 Version2 is newer
${VersionCompare} $BundledExe1 $OUT2 $OUT3
$Out3 will give you the result of versioncompare.
first declare the variables:
Var Out1
Var Out2
Var Out3
Var BundledExe1 ; this for ur bundled exe in installer
storing my bundled exe's version in variable BundledExe1
StrCpy $BundledExe1 "5.166.0.29"
;now fetch ver.info of user's exsisting exe say user.exe
${GetFileVersion} '$INSTDIR\user.exe' $OUT2
;now go for version compare:
; $OUT3=0 Versions are equal
; $OUT3=1 Version1 is newer
; $OUT3=2 Version2 is newer
${VersionCompare} $BundledExe1 $OUT2 $OUT3
$Out3 will give you the result of versioncompare.
A possibility to compare the change date of the files is not possible?
Have you tried :
SetOverwrite ifnewer
SetOverwrite ifnewer
Oh that's easy :-)
Thank you very much.
Thank you very much.