File is missing after upgrade - Advanced Installer Community
vsurajevs
Posts: 6
Joined: Thu Apr 21, 2016 3:00 pm

File is missing after upgrade

I am running into a very odd issue, very similar to http://www.advancedinstaller.com/forums ... ile#p84193, but in log I don't get any messages like "Disallowing installation of component". In logs there are just a few mentions of that component:
Line 5917: MSI (s) (F8:24) [14:45:21:195]: Executing op: UnregisterSharedComponentProvider(Component={2C2358CA-72C0-4AB4-B6BC-A0C1E0C8F46E},ProductCode={86229757-10CD-4477-BDC3-2433332345E7})
Line 5918: MSI (s) (F8:24) [14:45:21:195]: Executing op: ComponentUnregister(ComponentId={2C2358CA-72C0-4AB4-B6BC-A0C1E0C8F46E},,BinaryType=0,)
Line 5919: 1: {86229757-10CD-4477-BDC3-2433332345E7} 2: {2C2358CA-72C0-4AB4-B6BC-A0C1E0C8F46E}
Line 7777: MSI (s) (F8:24) [14:45:23:356]: Executing op: FileRemove(,FileName=a.ps1,,ComponentId={2C2358CA-72C0-4AB4-B6BC-A0C1E0C8F46E})
Line 7782: MSI (s) (F8:24) [14:45:23:358]: Executing op: FileRemove(,FileName=b.ps1,,ComponentId={2C2358CA-72C0-4AB4-B6BC-A0C1E0C8F46E})
Line 10413: MSI (s) (F8:24) [14:45:24:409]: Executing op: FileRemove(,FileName=c.bat,,ComponentId={2C2358CA-72C0-4AB4-B6BC-A0C1E0C8F46E})
The only difference that I could spot is that removal of a.ps1 and b.ps1 is followed by:
RemoveFiles: File: a.ps1, Directory: C:\some_path
MSI (s) (F8:24) [14:45:23:357]: Verifying accessibility of file: a.ps1
MSI (s) (F8:24) [14:45:23:358]: Note: 1: 2318 2:
MSI (s) (F8:24) [14:45:23:358]: Note: 1: 2318 2:
and:
RemoveFiles: File: b.ps1, Directory: C:\some_path
MSI (s) (F8:24) [14:45:23:359]: Verifying accessibility of file: b.ps1
MSI (s) (F8:24) [14:45:23:359]: Note: 1: 2318 2:
MSI (s) (F8:24) [14:45:23:359]: Note: 1: 2318 2:
but c.bat is followed by:
RemoveFiles: File: c.bat, Directory: C:\some_path
MSI (s) (F8:24) [14:45:24:410]: Verifying accessibility of file: c.bat
MSI (s) (F8:24) [14:45:24:410]: Note: 1: 2318 2:
(not sure what 'Note: 1: 2318 2:' does, but it was logged just once)

I figured out that c.bat in previous installer version had last modified date newer than c.bat in newer version of installer and overwrite behaviour was set to 'Overwrite only if the existing file is older'. I changed that to 'Always overwrite existing file', however that didn't take any effect, then I changed c.bat to have last modified date newer than it was in a previous installer version, but even that did't take any effect. Also I couldn't see any change in logging around 'c.bat' and '2C2358CA-72C0-4AB4-B6BC-A0C1E0C8F46E', so it looks like my changes ignored.

Other things I checked:
* in component properties of older installer version 'Never Overwrite' attribute wasn't set
* tried to move my custom action (that runs c.bat) to Finish Dialogs Stage - same behaviour.
* tried to remove c.bat file manually before running new version of installer - behaviour was also the same, but in logs only 'MSI (s) (C4:40) [16:01:58:046]: Verifying accessibility of file: b.bat' step was missing

Obviously, when I am performing a 'fresh' install everything is fine.

Is it sounds like a bug in AI? I am at v10.3.
Any help is highly appreciated as there almost no hair left on my head..
Last edited by vsurajevs on Fri Apr 22, 2016 10:38 am, edited 1 time in total.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: File is missing after upgrade

Hello and welcome to our forums,

I'm not sure why the issue still persists even after enabling the "Always overwrite existing file" option on the file from newer version of the installer. To start an in-depth investigation of this behavior can you please send us the following resources:
1. the AIPs (project files) of your old and new product version
2. a download link to the setup packages built with the above AIPs
3. a verbose log of the upgrade installation

to support at advancedinstaller dot com so we fully test and investigate them on our side?
Any help is highly appreciated as there almost no hair left on my head..
:) We will do our best.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vsurajevs
Posts: 6
Joined: Thu Apr 21, 2016 3:00 pm

Re: File is missing after upgrade

Hi Daniel,

Thank you for offering to look at that issue for me, however it is not possible to provide you with setup packages so you could replicate that issue.

I am going to look at creating new installers with the same issue so I could sent them to you, I will let you know if I will be able to reproduce that.
vsurajevs
Posts: 6
Joined: Thu Apr 21, 2016 3:00 pm

Re: File is missing after upgrade

Daniel,

I managed to recreate this issue with a new installers that I made from scratch.

v1 Installer installs a.bat and runs a.bat with Custom Action.
v2 Installer installs updated a.bat and runs a.bat with Custom Action.

Verbose log of v2 installation I sent to support at advancedinstaller dot com (subject: Re: File is missing after upgrade).

Thanks in advance for your help,
V
Attachments
issue.zip
(6.13 KiB) Downloaded 289 times
vsurajevs
Posts: 6
Joined: Thu Apr 21, 2016 3:00 pm

Re: File is missing after upgrade

Okay, after more investigation it turned out that 'Replaced by a new version' execution condition on Custom Action is causing that error: So Custom Action that executes .bat file is called on uninstalling previous version but it fails because file was already removed as a part of uninstall process.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: File is missing after upgrade

Hello,

Indeed, this is the case. If you still want to run the related custom action during the old version removal as a part of an upgrade installation, then you should add it before "Install Execution Stage -> Remove Resources" action group. Otherwise you should uncheck the "Replaced by a new version" execution condition.

Also, regarding the old file preservation issue I tested it and the file from the upgraded setup product was always installed even when the target file had a modified date newer than the one of the file from the upgraded setup.

If there is anything we can assist you with just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”