Reputation: 2634
Is there a posibility to tell Innosetup to uninstall the 32 bit version of the application (that usually resides in Program Files (x86)
) in order to install the 64 bit version of the application (usually in Program Files
). If the 32 bit version is not uninstalled, then bot of them will start at startup, causing problems.
I don't know if there is a procedure for this. Given the fact that the 64 bit application will basically be a different application, trying to uninstall the 32 bit application seems like trying to uninstall a non-related application.
The motivation will be that less and less vendors offer support for 32 bit libraries. For example, there are no 32 bit libraries for Qt for msvc2017. So the earlier I move to 64 bit the better.
Note: if this is not possible in Innosetup, any other alternative is welcome.
Upvotes: 8
Views: 1420
Reputation: 202682
Just uninstall the previous 32-bit version, as any other.
See How to detect old installation and offer removal?
It should work almost out-of-the-box, as long as both the installers for 32-bit and 64-bit version have the same AppId
. The only difference is that you need to look to for the uninstall key explicitly in HKLM32
(32-bit hive) instead of HKLM
/HKEY_LOCAL_MACHINE
(which defaults to 64-bit hive in 64-bit install mode).
If you uninstall the 32-bit version from InitializeSetup
already, as the accepted answer to the above question shows, Inno Setup won't notice that the 32-bit version ever existed and will even "reset" the default installation path to the 64-bit Program Files
folder.
Upvotes: 4