dean.kinnear
Posts: 2
Joined: Mon Jun 30, 2025 3:17 pm

Create full install that can also update if already installed

I am trying to build an exe installer for our product.
I want the same exe to either:

1) Full install if not already present
2) Update components if installed previously.

I keep the product code and upgrade code the same, just increment the version.
I want to persist the registry keys between updates.

I want the same custom action and dialogs for both and custom actions for both.

Help! version 21.5.1

Thanks,
Dean Kinnear
Catalin
Posts: 7504
Joined: Wed Jun 13, 2018 7:49 am

Re: Create full install that can also update if already installed

Hello Dean and welcome to our forums,
1) Full install if not already present
2) Update components if installed previously.
Please note that this is happening by default if you keep the same UpgradeCode, increase the version and change the ProductCode.
I want to persist the registry keys between updates.
How do I prevent a file or registry entry from being uninstalled or repaired?

The above article should help with this.
I want the same custom action and dialogs for both and custom actions for both.
Not quite sure I fully understand the scenario here. Please give me some more details.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dean.kinnear
Posts: 2
Joined: Mon Jun 30, 2025 3:17 pm

Re: Create full install that can also update if already installed

I want registry settings to only be removed on uninstall.
Right now, it is always removing registry on update as well.
I want to persist registry values between updates.
Catalin
Posts: 7504
Joined: Wed Jun 13, 2018 7:49 am

Re: Create full install that can also update if already installed

Hello Dean,

Please note that the update process consists of two steps:

- the uninstall of the previous version --> here, your registry entries are removed

- the install of the newer version

If you want to preserve the registry entries (i.e. do not remove them) on upgrade, please follow the steps presented in the article I linked above.

How do I prevent a file or registry entry from being uninstalled or repaired?
In a similar way, for registry keys, enable Preserve key content operation with REMOVE="ALL" condition from Registry Page for the parent key containing the registry values you want to avoid being uninstalled.
To do that, in "Registry" page right click on the key --> "Properties" -->
Screenshot_42.png
Screenshot_42.png (38.09 KiB) Viewed 1116 times

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”