Page 1 of 1

Apply upgrade installation and not removing the previous one

Posted: Mon Jan 12, 2009 12:42 pm
by samira
Is there any way that we can do an upgrade installation and not removing the previous one?

I tried to remove the lines in NEEDSUPGRADE if statement that were related to un-install but then at the end It's not installing or upgrading when I change the path or destination folder name ??!

( I mean the whole installation will not work if we remove Install/Remove MSI PAckage $PRODUCTCODE$[REMOVE=ALL] (get result into variable SUCCESS) ) I tried to change it to reinstall but still the whole setup is not working and nothing will be installed at the end with the same path as well as different path .

any idea ?

thanks

Posted: Mon Jan 12, 2009 4:54 pm
by MichaelNesmith
You should never do that. This will corrupt the MSI registry for your product code and will lead to completely unpredictable results as you have posted here.

Posted: Tue Jan 13, 2009 4:48 am
by ulrichard
Hi samira,

upgrades are not supported by default. That means, that you have to do it all yourself in the script.
I write some persistent registry strings with the user's choices (TARGETDIR and the like) on the first install. And mark some files as "never uninstall" and "don't overwrite".

The second time when an installer with the same productId comes along, it uninstalls the initial product (except the marked files), reads the persistent registry strings so the user doesn't have to specify the options again, and installs the remaining files.

It's a bit of work, its a bit error-prone, but it works.

Rgds
Richard