cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mary_v
Level 6

major upgrades and database changes

hi,

just a hypothetical situation:

i have an installation installed on a customer pc and i want to perform a major upgrade (because i added e.g. components).

am i right, if i say while performing the major upgrade the uninstallation uses the "old" msi file?
if so, is there a way to change this behaviour to "use the new msi file" ?

mary
Labels (1)
0 Kudos
(6) Replies
Kevin_L
Level 5

Hi,

I'm not totaly sure but yes, when you perform a major upgrade the MSI engine uses the previous MSI file (stored in \Installer\) to perform the uninstallation.

I think it's not possible to use the new MSI file to perform the uninstallation. And I think that isn't the good way.

Why do you want to use the new one?

Regards,

Kevin
0 Kudos
mary_v
Level 6

Kevin,

in my actual release i actually have moved one file in a separate component.
now, during major upgrade, this file shouldn't be removed.

i changed in my new added component properties from Permanent "No" to "Yes" and it works - but only after having installed this new release and for newer versions.
For now it's ok, but maybe in the future i want/have to change some behaviour again ...

hope it's clear what i mean ...

mary
0 Kudos
Kevin_L
Level 5

Mary,

You want to keep some files from the previous installation, isn't it?

I have an idea for your problem.

First, you must to detect if the previous version is already installed on the target computer. You can use the "System Search" (I think that the best way is test a registry entrie like HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstallation\).

Create a Custom Action before InstallValidate which copy your files in a temporary folder. Use as condition the property define in the "System Search" (I think you must also declare this property in the "Property Manager").

Create a second Custom Action after InstallFinaliez which copy your files from temporary folder to your installation folder. Use as condition the property define in the "System Search" (I think you must also declare this property in the "Property Manager").

I hope my intention is clear.

Regards,

Kevin
0 Kudos
Kevin_L
Level 5

Oops.

Kevin_L wrote:

... the previous MSI file (stored in \Installer\) to perform the uninstallation.


The correct folder is : \Downloaded Installations\

Kevin_L wrote:

... HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstallation\ ...


The correct registry entrie : HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\
0 Kudos
mary_v
Level 6

Kevin,

thanks for your interesting approach, I'll consider this in my next changes ...
for now, i think i'll go with my changes mentioned above ...

how useful in your eyes is the systemsearch?
Until now i always use custom actions which mostly do the same.

mary
0 Kudos
Kevin_L
Level 5

Mary,

I always use the "System Search" when I need to find an existing file or registry entry.

I also use it for keep registry value when I want to perform a major upgrade 😉

I think it is more easy/quickly to use than a CA.

Regards,

Kevin
0 Kudos