Keep existing 32-bit Inno Setup installation path for upgrades, use 64-bit path for new installations
09:59 31 Mar 2017

Our application now supports 64-bit natively and therefore should be installed below the C:\Program Files directory by default. For that reason we set these two directives:

ArchitecturesInstallIn64BitMode=x64
DefaultDirName={pf}\{#ProductName}

This works without any issues so far!

The problem is that we do have a lot existent installations of our product when it was still 32-bit only and therefore correctly installed below C:\Program Files (x86).

Normally Inno Setup detects an existent installation and uses the same installation path, if it finds one. But this seems not to work when changed from 32-bit to 64-bit mode - probably because now a different uninstall registry key is used.

Is there still a way to tell Inno Setup to use the existent 32-bit installation path, if the application was installed already (to perform an update) and only use the 64-bit one if it is a new installation?

inno-setup