File removed after upgrade

Got a problem you cannot solve? Try here.
sdo
Posts: 2
Joined: Fri Apr 01, 2016 2:31 pm

File removed after upgrade

Postby sdo » Fri Apr 01, 2016 4:45 pm

Hello,

I am using InstallAware version 12.22.0.2012

i am running into an issue where a select few unversioned files (xml & gif) are removed after an upgrade. You see a line that looks like this in the log:

Code: Select all

MSI (s) (54:1C) [09:50:21:428]: File: C:\Program Files (x86)\Company\Product\Example.xml;             Overwrite;          Won't patch;   Existing file is unversioned and unmodified - no source file hash provided to compare


The issue does not happen all the time, only when certain applications are running while the upgrade is happening. These applications are components of the product getting upgraded so if they are in use, they should be replaced on reboot. When it works, you see something to this effect:

Code: Select all

Info 1902.Scheduling reboot operation: Renaming file C:\Program Files (x86)\Company\Product\xxxx.tmp to C:\Program Files (x86)\Company\Product\Example.xml. Must reboot to complete operation.


When it works, MainEngineThread returns 3010 as expected.

When it does not MainEngineThread returns 0.

What would cause the replace file-in-use functionality to not work as expected in one case but correctly in the other?!?

I have submitted to Francesco via email sample logs for both a good and bad installs.

I appreciate your help.

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

Re: File removed after upgrade

Postby FrancescoT » Mon Apr 04, 2016 6:00 am

Dear Sdo,

I had a look at the log files you sent me, but there are some points concerning your upgrade process that are not full clear to me.

As first you must consider that with a full upgrade, the installed previous version is completely removed (UN-INSTALLED) before the new product version gets installed. This happens in two distinct and independent steps that do not have any direct relation to each other.

In other words when a full upgrade gets executed, it's quite identical to first manually un-install a product (eg. from Add Remove Program) and then to proceed with the package installation via <setup.exe>.

Both your logs are referred to the product installation phase and these do not report any MainEngineThread errors. These only differ with the code returned by the respective MainEngineThread processes (0 and 3010).

That said, it would help to know which is the exact operation your installer does over those "xml & gif" files.
Are these files installed each time by your package? or ... are you just copying/moving such files on the target machine?

Last but not least, you should also consider that is Always recommended to shut-down any running application that may interfere with the setup process.

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

sdo
Posts: 2
Joined: Fri Apr 01, 2016 2:31 pm

Re: File removed after upgrade

Postby sdo » Mon Apr 04, 2016 2:30 pm

Thank you for your reply Francesco.

I have created the installer based on the "Basic Setup" template. If NEEDSUPGRADE is true, the script executes the "Install / Remove MSI Package" command. There will allways be some files in use because I am relying on installed components to aid in the upgrade process. In this particular case, all files are expected to be replaced.

The files that are giving me trouble are static files that get installed in to one location and are not moved or copied. Nor do they ever get edited.

What I do know is that when the install works as expected MainEngineThread reports 3010 as opposed to zero.

It seems like these files are scheduled to be deleted but not restored.

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

Re: File removed after upgrade

Postby FrancescoT » Tue Apr 05, 2016 8:54 am

Dear Sdo,

as I said previously, the product uninstall/install process should be Always executed when any of the files involved with the processes are NOT in use. This is a fundamental rule. In fact, I am sure you seen often other installation packages that explicitly ask for the closure of the application before to proceed.

For what concerns the rest, I believe that probably most of your problems occur when the product gets removed (..."If NEEDSUPGRADE is true, the script executes the "Install / Remove MSI Package" command"). For example, you may try to verify if package is effectively removed as expected. This can be easily done with trying to remove the product from Add remove Program.

At any rate, I strongly recommend you to find a solution in order to shut-down any running application that may interfere with the setup process (uninstall/install ). If it's too difficult or complicated to achieve this task programmatically, you may ask the user to shut down such application before to proceed and this should be done while UnInstalling or Installing the product.

Hope this helps you.
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 89 guests