View Full Version : Major Upgrade: Registry entries deleted at the wrong place...

07-29-2002, 01:39 PM
Hello everybody,

I have a very annoying problem and I hope someone can give me some help on that issue.

I am trying to do a major upgrade as described on www.installsite.org (basically, I changed the product & package code and added the previous version product code in the upgrade table). The whole process works fine ; when I launch the new setup, the previous installation is uninstalled and then, the new application is installed.

That seems perfect except for one detail... When I installed the old version (let's say 1.0), I created in the script some registry entries using 'RegDBSetKeyValueEx'. When I upgraded to 2.0, these registry entries were modified during the installation of 2.0. After the installation of 2.0, the entries created by 1.0 were deleted.

It seems weird to me that, during the installation of 2.0, when IS is removing 1.0, all the files from 1.0 are removed and then the files of 2.0 are installed BUT the registry entries of 1.0 are cleaned only at the very end of the installation... It also seems weird that reg entries created with 'RegDBSetKeyValueEx' are cleaned when doing an uninstall (InstallScript help says 'All registry entries should be created in the Registry view of the IDE. Handling all of your registry changes in this way allows for a clean uninstallation through the Windows Installer service').

Can anyone help me on that?

I have tried a solution proposed on this forum where it was said to add the reg entries in a permanent component, but that does not work since my 1.0 did not have the reg entries in a permanent component...