|
|
#1 |
|
Junior Member
Join Date: Jan 2005
Posts: 7
|
setoverwrite by version
In the past, I have used InstallShield and it had a way to specify file overwrite by (VERSION | DATE) where a file would be overwritten if the new file had a greater version than the old file, independent of the date/time stamp. I assumed, wrongly I believe, that the 'SetOverwrite ifnewer' would take file version (if avaible) into account. Is there a simple way to ensure that a file is overwritten if the source file has a newer version than the destination?
- Charlie |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Nov 2004
Location: Russia Kursk-city
Posts: 47
|
> Is there a simple way to ensure that a file is overwritten
You can set "SetOverwrite on" - and it will be always overwritten. If file is blocked (by system, or currently is running) - installer will notify you. |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jan 2005
Posts: 7
|
I realize that, but I only want to override if the file is newer. I would like the definition of 'newer' to be 1) first version 2) then date if necessary. If this does capability not exist, it seems like a nice feature that shouldn't be too dificult to implement. I am hoping, though, that I missed a simple mode/setting to accomplish my goal
|
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
You can use GetDLLVersion and GetDLLVersionLocal to do the version comparsion. You can use the Library or the older UpgradeDLL macro to do this comparison for you.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jan 2005
Posts: 7
|
Yes, I have used those functions/macros primarily for updating system DLLs. I was just hoping that I missed some capability in the File command that would allow more control over overwriting files. It seems that I did not miss anything and will need to use something other than the File command to update my files.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|