I have an installer that write this line in the Windows registry
[Registry]
Root: "HKCU"; Subkey: "SOFTWARE\W117GAMER"; ValueType: string; ValueName: "DSVersionL4D2"; ValueData: "{#MyAppVersion}"
taking into account that {#MyAppVersion}
is defined and written when the program is installed
#define MyAppVersion "2.7"
I am constantly updating the installer, which is why some people have old installations, and when they update, old files that conflict are combined, so as not to uninstall the previous version, there is some way to read this registry before starting the installation.
- First case: if the user has an old version, uninstall it and install the new version
- Second case: if the user has the same version, tell them that they
already have the latest version installed and cancel installation - Third case: if the user has a version installed and is going to
install an old version, tell them that they already have the newest version of the program
I read previous posts but they only work with "GUID" or "appID" of the program, try to modify some lines of code but I could not get anything, if someone could help me I thank you in advance, sorry for my English I use a translator I am from Latin America
How to detect old installation and offer removal?
Inno Setup: How to automatically uninstall previous installed version?