PDA

View Full Version : Single Installer/Uninstaller for multiple features - is it possible?



dpavlic
06-02-2011, 04:14 AM
Hi,

Is it possible to have a single Installer/Uninstaller which can be used to add/remove installed features?

I'm looking for a way to have a single SetupBuilder installation (single .exe, single GUID, single Installed Programs entry), but that installs multiple Features that can be added/removed.

For example, I know it's possible to make a single installation .exe that installs multiple GUIDs, and to use 'Detect Previous Version' to detect what is already installed.

I could make a custom checkbox dialog, detect by GUIDs one by one and show to the user all features - those installed checked, and those not installed unchecked.
So when the user makes some change e.g. unchecks a feature it calls the appropriate uninstaller, and when a new feature is checked it installs it.

But, this will create multiple uninstallers - one for each GUID, and I think it will create multiple entries in the Installed Programs - which I'd like to avoid.

Is there a way that the same file is both the installer and the uninstaller, and that multiple GUIDs don't produce multiple Installed Programs entries, or can you suggest another approach to this issue?

Thanks in advance.

Daniel Pavlic
www.thinetsolution.com

linder
06-02-2011, 04:41 AM
Hi Daniel,

If you use the same Product GUID, the same uninstaller .exe and the same .log file names, then the "update" install will write to the existing uninstall .log (and append the uninstall info). It will not create a new uninstall .exe. During the uninstall process, the single uninstall .exe will then uninstall whatever is logged in the uninstall .log file.

Does this help?

BTW, it is not possible to remove just a specific "feature" during the uninstall.

Friedrich

dpavlic
06-02-2011, 08:53 AM
Hi Friedrich,

I'd like to change the file locations that I ship with my Clarion 3rd party product. In order to do that (and not to leave the old files in place which could cause troubles), I need to run the uninstaller first and then make a clean installation.

I've placed the uninstall call at the beginning of the install script, so that everything is (optionally) removed before continuing with the installation.

The problem is that the uninstaller will remove all already installed features and some features are not related to do with the files that need to be removed from a specific Clarion environment.

This is not a big problem since the user just needs to reinstall those features again.

However, sometimes the user does not want to uninstall everything, for example when installing into a different Clarion version.

So I'm thinking to change the GUID of the new installer version, and do an uninstall only if the Detect Previous Version returns the old GUID.

In this way the uninstaller will run just once and clean everything before doing the installation.

I think this is an acceptable solution for the problem, would you agree?

linder
06-02-2011, 09:04 AM
Hi Daniel,

Yes, I agree. Seems to be a good plan.

Friedrich

dpavlic
06-02-2011, 09:13 AM
Hi Friedrich,

Thanks for quick answering to my questions!

linder
06-02-2011, 09:16 AM
You are very welcome, Daniel!

Friedrich