MikeBotham
Posts: 3
Joined: Wed Dec 12, 2018 11:55 pm

Dedicated Uninstaller for multiple products

Hello All,

I was wondering what the best option for creating a dedicated uninstaller for multiple different products. We have approximately 50 upgrade codes and we would like to create an uninstaller that is able to optionally uninstall whichever one is installed.
eg)
Product 1
- Product 1 - 2010
- Product 1 - 2011
- Product 1 - 2012
...
Product 2
- Product 2 - 2010
- Product 2 - 2011
- Product 2 - 2012
...

So I was just wondering 2 things:

1) Is there any way to specify the package as just an uninstaller? Right now I can only create an installer that has to do some sort of install action - add file/folder etc.

2) I have looked at the Configure Dialog as well as the Optional Features Dialog and either would work if I add each one as a feature and then correspond each feature as a specific uninstall custom behavior. I just don't know if there is a better way to do this, like creating all the features automatically from a list of upgrade IDs in the install parameters.

Thank you for your time,
-Mike
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Dedicated Uninstaller for multiple products

Hello Mike,

To be fully honest with you, I can not think of an "easy" way to achieve what you want.

One solution to this would be the use of the "Upgrades" page.

In the "Upgrades" section of the "Upgrades" page, you can specify the UpgradeCode of the packages that the setup may uninstall when it performs an installation.

However, the drawback to this is the fact that the process can not be conditioned. If I understood your requirement correctly, you want to uninstall the packages based on the user selection.

Now, coming back to your questions:
1) Is there any way to specify the package as just an uninstaller? Right now I can only create an installer that has to do some sort of install action - add file/folder etc.
Unfortunately, you can not create an "uninstaller" package. However, we can do some hacks to make this look like an uninstaller.

For instance, we can make a lightweight setup (instead of the regular one). The usage of a lightweight setup will make the installer look more like an "uninstaller".

In addition to that, you can specify that the setup created with Advanced Installer will not be registered with Windows Installer. If this option is not checked, it will not appear in Control Panel. Basically, it will feel like nothing was installed.

For more information about this, please have a look over our "Product Details Page" article.
2) I have looked at the Configure Dialog as well as the Optional Features Dialog and either would work if I add each one as a feature and then correspond each feature as a specific uninstall custom behavior. I just don't know if there is a better way to do this, like creating all the features automatically from a list of upgrade IDs in the install parameters.
As I have mentioned earlier, unfortunately, some manual work must be done in order to achieve this.

Indeed, your proposal sounds good.

What I was thinking is the following:

- create a .BAT file that uninstall each of your products. The .BAT file can look something like this:

Code: Select all

msiexec /x {ProductCode}
For more information about this, please have a look over the "MsiExec.exe Command Line" article.

- add all the .BAT files in the "Prerequisites" page as "feature-based" prerequisites. This way, based on the user selection, the appropriate .BAT file will be executed.

Info: for each feature-based prerequisite, a new feature is created in the "Organization" page.

Hope this helps somehow.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”