Question

What is the equivalent for Visual studio installer upgrade code in Inno Setup? I found this article How do I uninstall related products in Inno Setup using an InstallShield Upgrade Code GUID to search for products using the upgrade code. Is AppId same as UpgradeCode? I'm new to Inno setup, could anyone help me out here?

Was it helpful?

Solution

Typically you do not uninstall older versions of the application when you install an upgrade.

The AppId is sort of related; given two installers (or more commonly two versions of the same installer) with the same id, by default Inno will offer to install into the same folder as the previous install, and the two will share uninstall information.

Generally, when releasing an upgraded version of the same application all you need to do is to ensure that the AppId (or the AppName if you didn't specify an id) is the same as in the older version, and everything will just work.

One thing that is strongly recommended though (even for the first version) is to add the following to your [Setup] section:

DisableDirPage=auto
DisableProgramGroupPage=auto

This will let the user select where to install on first install, but hide the selection on subsequent installs/upgrades. Since Inno defaults to the previous location anyway, this avoids any possible confusion (and leftover files) that can result from changing the install location from one install to the next.

Beyond that there is rarely any need to do anything else. On rare occasions you might make a particular file used in a prior version redundant (eg. no longer using a particular library); if you wish you can deal with this by using an [InstallDelete] entry to remove any files from prior versions that are no longer required. (Always ensure that you only delete specific files by name -- using wildcards is extremely dangerous.) There's usually not much harm in leaving redundant files behind, though (unless they're huge) -- they'll still eventually get cleaned up if the user uninstalls.

If you want to customise the behaviour further there are various things you can do in [Code].

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top