NATIVE_OVERWRITE does not work as expected

Got a problem you cannot solve? Try here.
Galina
Posts: 17
Joined: Thu Aug 27, 2015 3:02 pm

NATIVE_OVERWRITE does not work as expected

Postby Galina » Thu Aug 27, 2015 3:15 pm

Installation script uses NATIVE_OVERWRITE=True. Installation setup will successfully replace the database file (XXX.DBF), but it will leave the old one with extension ".0" (XXX.DBF.0) in the folder. The file we are replacing older then the new one.

We do not want any temporary files presented in the folder Any additional steps/considerations when writing scripts? Any help will be appreciated.

Thanks

Galina.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: NATIVE_OVERWRITE does not work as expected

Postby FrancescoT » Fri Aug 28, 2015 11:36 am

Dear Galina,

I suppose that what you are reporting is the default behavior due the use of NATIVE_OVERWRITE as True.

The "NATIVE_OVERWRITE" variable 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. As reported with the InstallAware documentation, this is not a recommended approach and due security reasons (suppose the case that such variable has been "mistakenly" set to TRUE), a copy of the files that get replaced are then left within the folder.

That said, it's really simple to permanently remove such files using the "Delete Files" command. The command allows the use of wildcards with the file(s) parameter.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Galina
Posts: 17
Joined: Thu Aug 27, 2015 3:02 pm

Re: NATIVE_OVERWRITE does not work as expected

Postby Galina » Fri Aug 28, 2015 1:07 pm

Thank you!

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


This is not the case. Installation has newer files than files existing in the folder. Installation replaces all the older files correctly, but for some of them (dbf and mdx extensions) there are "*.0" files, for others (exe, xml etc.) - no files like that.

copy of the files that get replaced are then left within the folder.


Cold you refer me where it is documented and what exact rules are applied?

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: NATIVE_OVERWRITE does not work as expected

Postby FrancescoT » Mon Aug 31, 2015 4:15 am

Dear Galina,

This is not the case. Installation has newer files than files existing in the folder. Installation replaces all the older files correctly, but for some of them (dbf and mdx extensions) there are "*.0" files, for others (exe, xml etc.) - no files like that.

In all honesty I don't understand why to use NATIVE_OVERWRITE if your files are newer. Anyway, are you absolutely sure that the installed files are effectively newer of the existing files? For example; existing database files may have been updated recently and due of this, they are newer of those included with your setup.

Cold you refer me where it is documented and what exact rules are applied?

This is reported with the Pre-Defined variables documentation.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Galina
Posts: 17
Joined: Thu Aug 27, 2015 3:02 pm

Re: NATIVE_OVERWRITE does not work as expected

Postby Galina » Mon Aug 31, 2015 7:56 am

Thank you, FrancescoT ,

In all honesty I don't understand why to use NATIVE_OVERWRITE if your files are newer. Anyway, are you absolutely sure that the installed files are effectively newer of the existing files? For example; existing database files may have been updated recently and due of this, they are newer of those included with your setup.


This is reported with the Pre-Defined variables documentation.


We are using Native Engine and NATIVE_OVERWRITE set to "Always" to automatically overwrite files if applicable. We are using dbase, where each table is represented with multiple files, and from this prospective there is no difference between database file and any other file(exe, xml ext.). However script works differently for dbf, mdx vs. other extensions - replaces target file correctly, but leaves older file with ".0" extension. I was not able to see this behavior documented in Pre-Defined variables documentation. You've suggested to delete older files with ".0" extensions. explicitly in the script, but I would like to know the rules more specifically - to make sure that deleting "*.0" would be sufficient, or any other possible variations could apply - "*.1", "*.2" etc...

Thanks again,

Galina

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: NATIVE_OVERWRITE does not work as expected

Postby FrancescoT » Mon Aug 31, 2015 10:28 am

Dear Galina,

as already said; the behavior of the NATIVE_OVERWRITE pre-defined variable, as any other pre-defined variable as well, it's descibed in the Pre-Defined Variables topic which is part of the InstallAware documentation.

From the IA documentation;

"NATIVE_OVERWRITE: Initially PROMPT. With the initial value, when setup is about to overwrite a file during a native engine installation, the end-user will be prompted with an overwrite dialog displaying the file dates and versions for both the new file and the old file, as well as the options to overwrite or skip the file. Set to ALWAYS to automatically overwrite files. Set to NEVER to automatically skip installing files that already exist on the target. Any other value will be interpreted as PROMPT. If the end-user makes the choice to apply the overwrite decision in the prompt dialog to all files, this variable will also be automatically updated, keeping the setup script aware of end-user choices and providing it with the ability to override them."

"NATIVE_OVERWRITE_OLDER: 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."

hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Galina
Posts: 17
Joined: Thu Aug 27, 2015 3:02 pm

Re: NATIVE_OVERWRITE does not work as expected

Postby Galina » Mon Aug 31, 2015 1:36 pm

Dear Francesco,

The IA document does not answer the question about ".0" files created by InstallAware script in installation folder. Would it be possible to escalate to developer/research this use-case? We can take it off line if needed. Please let us know who/how we could contact to clarify ?

Thank you,

Galina

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: NATIVE_OVERWRITE does not work as expected

Postby FrancescoT » Wed Sep 02, 2015 9:23 am

Dear Galina,

I just spoke with our dev team.

There are no backups created by the native engine.
The mechanism observed is the file overwrite mechanism that attempts to minimize needed system reboots.

Upon reboot, those renamed files are automatically removed. If a file rename fails, an immediate reboot at the end of the installation process is suggested by the native engine.

That said, the so-called backup files, which are really temporarily renamed files marked for deletion upon a reboot, should be removed automatically upon a system reboot.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Galina
Posts: 17
Joined: Thu Aug 27, 2015 3:02 pm

Re: NATIVE_OVERWRITE does not work as expected

Postby Galina » Wed Sep 09, 2015 10:43 am

Dear Francesco,

Thank you for the help! Unfortunately reboot is not an option for our clients. I've added recursively deletion for .0 files assuming this is the only extension for these temp files. Your research's just confirmed this. Thanks again!

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: NATIVE_OVERWRITE does not work as expected

Postby FrancescoT » Wed Sep 09, 2015 10:54 am

:D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 143 guests