Page 1 of 1

NATIVE_OVERWRITE

Posted: Mon Oct 07, 2013 6:35 am
by FridgeWheeL
Good Day

I am trying to force overwriting the destination files in my installation with the source files in my installer by setting the NATIVE_OVERWRITE variable to ALWAYS

This seems to work perfectly fine where existing files file version date is lesser than the new source files, but as soon as the file version is the same the files do not get overwriten even if the modify date of the source files are later than the existing destination files.

See screenshot below:
(I want to overwrite the existing file on the left with the new source file on the right)

Image

Re: NATIVE_OVERWRITE

Posted: Mon Oct 07, 2013 10:48 am
by FrancescoT
Dear User,

please have a look at the following thread;
http://www.installaware.com/forum/viewtopic.php?f=2&t=8845

regards

Re: NATIVE_OVERWRITE

Posted: Tue Oct 08, 2013 12:04 am
by FridgeWheeL
FrancescoT wrote:Dear User,

please have a look at the following thread;
http://www.installaware.com/forum/viewtopic.php?f=2&t=8845

regards


Hi FrancescoT

I understand that the NATIVE_OVERWRITE_OLDER allows newer files to be overwritten with older ones, that is not my query. My query is why an older file with the same file version as the newer file in my source can not be overwritten by setting the NATIVE_OVERWRITE variable to ALWAYS

Re: NATIVE_OVERWRITE

Posted: Tue Oct 08, 2013 9:10 am
by FrancescoT
Dear User,

That was exactly my answer, this behavior is controlled by the NATIVE_OVERWRITE_OLDER pre-variable and not by the NATIVE_OVERWRITE;

Initially FALSE. Determines whether the native setup engine is allowed to replace files that have been determined to be newer with older files that are included in the installation. Set to TRUE to permit the native setup engine to replace files that are newer with older copies (this is not recommended). This variable overrides the value of the NATIVE_OVERWRITE variable when FALSE, and the file being installed by setup is determined to be older than the file already present on the target system. The native engine compares files as follows: If both files are versioned, the decision is based on the comparison of the file versions (the installed file has to be a newer version than the present file). If none of the files are versioned, the decision is based on the comparison of file dates (the installed file has to be modified more recently than the present file). If the file being installed lacks version information but the present file contains version information, the file being installed is assumed to be older. If the file being installed contains version information but the present file lacks version information, file dates are compared.


... and in your case Both files share the same version, so it is not replaced.

Regards

Re: NATIVE_OVERWRITE

Posted: Thu Oct 10, 2013 12:22 am
by FridgeWheeL
Hi Franceco

I think I misunderstood the variable a bit and I must confirm that once the NATIVE_OVERWRITE_OLDER variable was set to TRUE, it was able to overwrite the older same versioned file with the newer one.
The 1st time I tested it I think I set the NATIVE_OVERWRITE_OLD variable instead of NATIVE_OVERWRITE_OLDER.

My Apologies for the misunderstanding.

Thank you for your assistance :)

Re: NATIVE_OVERWRITE

Posted: Thu Oct 10, 2013 10:12 am
by FrancescoT
No problem!
:D :D :D