问题
The scenario occurs when having to switch Installers (in this case Wise moving on). The situation of previous Inno Installers is handled by the Installer here.
One inelegant way of telling whether a pre-Inno version is by absence of a reg key installed with Inno versions:
Root: HKCU; Subkey: "Software\{#MyAppPublisher}\{#MyAppName}"; ...
But the other more reliable way (assuming absence of above key by user CCleaner intervention or other) is interrogating the following:
Software\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppName}
Wise actually used the installation log as the uninstall repo, so the value of the above key was:
(Some full qual path name)\UNWISE.EXE (Some full qual path name){#MyAppName}\INSTALL.LOG
Now once detecting the key exists, a complete re-install is required, but just a little bamboozled as to exactly how to best implement the answers of this question in light of the above. Thanks for suggestions.
来源:https://stackoverflow.com/questions/44633180/update-installed-recent-inno-version-but-remove-older-non-inno-versions-before-r