anupmistry
Posts: 52
Joined: Tue Jan 12, 2010 6:39 pm

UpgradeCode question

In our project we are upgrading existing products. We have it setup such that in the "Upgrades" tab we have following values setup.

**********************************************************************************************************************************************************************************
Application Versions
Automatically upgrade older product versions is selected.

Order
Uninstalled older version first and then install new version is selected

Upgrades
Has one entry that we have gathered by doing the 'New ...' and then selecting the msi which has Upgrade Code of {7112D337-53E6-4031-9A11-876DA8BE0C93}
**********************************************************************************************************************************************************************************

The previous product we had two installers (32-bit and 64-bit). The upgrade code for both is the same {7112D337-53E6-4031-9A11-876DA8BE0C93}.

Test case 1: success
If on a 32-bit Win7 PC we first install the prior version 32-bit and then upgrade to current version everything works fine. It removes the older 32-bit version.

Test case 2: success
If on a 64-bit Win7 PC we first install the prior version 32-bit and then upgrade to current version everything works fine. It removes the older 32-bit version.

Test case 3: failure
If on a 64-bit Win7 PC we first install the prior version 64-bit and then upgrade to current version it fails with error 1001. Exception occurred while initialization the installation. System.IO.FileNotFoundException: Could not load file or assembly. C:\Program Files (x86)\DocumentVision 2010 Pro Server\KillDVProcesses.exe' or one of its dependencies.

So what seems to be happening in Case 3 it somehow changes the path to 32-bit Wow even if the previous package was a 64-bit that is without the x86. That is where that file exists C:\Program Files\DocumentVision 2010 Pro Server\.

Got a trace for the Case 3 will upload as an attachment.
Trace.zip
(347.53 KiB) Downloaded 338 times
.
It was created using "D:\Install.exe" /L*VX "c:\advi\install.log"

If you see on line 2012 it modifies the path, not sure why:
MSI (s) (F8:BC) [14:08:49:249]: WIN64DUALFOLDERS: 'C:\Program Files (x86)\' will substitute 17 characters in 'C:\Program Files\ACS\DocumentVision 2010 Pro Server\' folder path. (mask argument = 0, the folder pair's iSwapAttrib member = 0).
MSI (s) (F8:BC) [14:08:49:249]: PROPERTY CHANGE: Modifying TARGETDIR property. Its current value is 'C:\Program Files\ACS\DocumentVision 2010 Pro Server'. Its new value: 'C:\Program Files (x86)\ACS\DocumentVision 2010 Pro Server\'.

Then error occurs on line
MSI (c) (BC:24) [14:08:53:746]: Creating MSIHANDLE (1511) of type 790541 for thread 3620
MSI (c) (BC:24) [14:08:53:746]: Creating MSIHANDLE (1512) of MSI (c) (80:AC) [14:09:01:205]: Closing MSIHANDLE (1565) of type 790531 for thread 2476
Error 1001. Error 1001. Exception occurred while initializing the installation:
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Program Files (x86)\ACS\DocumentVision 2010 Pro Server\KillDVProcesses.exe' or one of its dependencies. The system cannot find the file specified..
MSI (s) (F8!C0) [14:09:01:206]:
MSI (s) (F8:64) [14:09:01:246]: Leaked MSIHANDLE (410) of type 790531 for thread 1216

How do we avoid the case 3 error. Hope I was able to explain the issue clearly ....

Thanks!
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: UpgradeCode question

Hello,

I'm not sure why you are getting this behavior. Did you consider the pointers from the "Automatically upgrade older product versions" section of the following article while authoring your packages?
http://www.advancedinstaller.com/user-g ... rades.html

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
anupmistry
Posts: 52
Joined: Tue Jan 12, 2010 6:39 pm

Re: UpgradeCode question

Hi Mihai,

We are active on support hence can you bring this to their attention. Maybe they can read that enormous trace file better.

Any other ideas? Can I write a "custom action" that runs pre-install that will force uninstall the software from users PC. Like I have seen several articles on using msizap.exe to uninstall programs that get errors when trying it the regular way through control panel.

Thanks
Anup
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: UpgradeCode question

Hi Anup,

The problem is that the upgrade of the 64 bit package from the 32 bit one is not possible. This happens because during the costing operations the paths get redirected
and all the files will not be accessible. In your case the uninstall failed because of the custom action. But even if you would not have the custom action
and the remove would complete without any errors the files found under Program Files would not be removed.

You could try to create a 64 bit Win32 DLL or executable, that runs under the UI sequence of the first package and removes the 64 bit older version.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
anupmistry
Posts: 52
Joined: Tue Jan 12, 2010 6:39 pm

Re: UpgradeCode question

Bogdan wrote:The problem is that the upgrade of the 64 bit package from the 32 bit one is not possible.
As such since the first installer is already deployed changing it will be no good. But I can find that file(C:\Program Files (x86)\DocumentVision 2010 Pro Server\KillDVProcesses.exe). Is there anyway in the new installer I can add that file(C:\Program Files (x86)\DocumentVision 2010 Pro Server\KillDVProcesses.exe) and put it in the location it is looking for.

So what I am asking is anyway to copy the file into the said location before it runs the uninstall of the first installer?

Hope this is clear
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: UpgradeCode question

Hi,

You could try this backup method, and modify it to suite your requirements.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
anupmistry
Posts: 52
Joined: Tue Jan 12, 2010 6:39 pm

Re: UpgradeCode question

Hi Bogdan,

Was able to write a vbscript that copies the file over and added it to the Install (verify dialog) subscribed events as a DoAction. So did not have to mess with the other events, etc.

Thanks!
Anup Mistry

Return to “Common Problems”