Balaji
Posts: 53
Joined: Wed May 06, 2020 9:15 am

Uninstall particular MSI from bootstrapper EXE

Hi,
Greeting of the day!
Let me explain my scenario :

1. I have created bootstrapper EXE containing 2 MSIs (e.g. MSI1 and MSI2) as it's prerequisite(Feature Based).
2. I have added combo box to select which MSI to install(i.e. when I select MSI1 from combo box then only MSI1 will install similarly for MSI2).
3. Now, on my machine Bootstrapper and MSI1 installed on my Machine.
4. Now, again I want to install MSI2 using same bootstrapper EXE.
5. But, when I am trying to execute same EXE it ask for uninstall previously installed bootstrapper and MSI1.
6. That means on same machine I will not install MSI1 and MSI2.
7. Is it possible to install both MSIs.
8. And if MSI1 is already installed and again I am trying to install MSI1 then it should uninstall MSI1
9. similarly, if MSI2 is already installed and again I am trying to install MSI2 then it should uninstall MSI2.
10. Is it possible to add such feature.
I hope it will help you to understand my current scenario.
Please help me out to resolve this issue.

Thanks and regards!
Balaji
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall particular MSI from bootstrapper EXE

Hello Balaji,

I have answered your forum thread here:

viewtopic.php?f=5&t=45332&p=116080#p116080

Hope it helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Balaji
Posts: 53
Joined: Wed May 06, 2020 9:15 am

Re: Uninstall particular MSI from bootstrapper EXE

Hi Catalin,
Thanks for your reply.
You have answered on Upgrade/Downgrade thread.
This is slightly different requirement that's why I have created a separate thread.
If you go through my previous post, it will help you to understand current problem.
Let me briefly explain it again.
I have created bootstrapper EXE containing 2 MSIs (e.g. MSI1 and MSI2) as it's prerequisite(Feature Based).
I have added combo box to select which MSI to install(i.e. when I select MSI1 from combo box then only MSI1 will install similarly for MSI2).
When I execute EXE, from cobo box I want to install MSI1. So, I have selected MSI1 and on my machine bootstrapper and MSI1 gets installed.

Again, I want to install MSI2 on same machine so, I have again executed same bootstrapper EXE. But, the bootstrapper product Id is known for windows installer So, it has redirected me on maintenance TypeDlg and asked for uninstall it first.(So it will uninstall bootstrapper and MSI1).
But, I want both MSI1 and MSI2 on same machine(by executing EXE couple of times i.e. firstly for MSI1 and second for MSI2).

Requirement : If MSI1 is already installed on my machine and again I will select MSI1 from combo box to install then only MSI1 gets uninstalled.

Just my concern is that is it possible to achieve this using AI ?

Thanks and regards!
Balaji
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall particular MSI from bootstrapper EXE

Hello Balaji,

Indeed, you are right. It seems that I have misunderstood your scenario here. I apologize for this.

Basically, what you want to achieve is the default behavior.

Let's consider we have a main pacakge that contains two prerequisites: prereq1 and prereq2.

Upon installation, only prereq1 gets installed.

When you launch the EXE bootstrapper again, the setup will be launched in Maintenance mode.

maintmode.png
maintmode.png (55.38 KiB) Viewed 5314 times

If you click on "Modify", the configuration dialog will be displayed, which will allow you to either install / uninstall a feature.

prereqstate.png
prereqstate.png (56.59 KiB) Viewed 5314 times
By default, the feature state is set to "Entire feature will be unavailable". However, you can change this by changing the feature state.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Balaji
Posts: 53
Joined: Wed May 06, 2020 9:15 am

Re: Uninstall particular MSI from bootstrapper EXE

Hi Catalin,
Thank you for your solution approach.
Actually, I forgot to mention I have modified Maintenance TypeDlg.
I have used "Uninstall" button and "Modify", "Repair" buttons are hidden.
Also, we want to execute MSIs silently so, we have added this feature as well.
Due to this modifications made under "Maintenace TypeDlg" I am not able to proceed with your given steps.
Is there any other way to meet my requirement?

Thanks and regards!
Balaji
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall particular MSI from bootstrapper EXE

Hello Balaji,

Most probably yes, it is possible to achieve that in a custom way, but you will end up with the exact logic used by the "Modify" option. No matter how we do it, the logic behind it will be the same:

- user selects a feature

- an event is executed that will install / uninstall the feature

With that being said, I would advise to using that option, since it comes as the default logic.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Balaji
Posts: 53
Joined: Wed May 06, 2020 9:15 am

Re: Uninstall particular MSI from bootstrapper EXE

Hi Catalin,
Yes, I want to add custom logic regarding same.
One question -
If I have unchecked "Register Product windows installer" from product details tab, can I use uninstall feature?

Thanks,
Balaji
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall particular MSI from bootstrapper EXE

Hello Balaji,

As it can be seen in the following article:

Product Details Tab

Register product with Windows Installer:
If this option is not checked you cannot remove, repair or reinstall the application by using the Control Panel, the Windows Installer command-line options or the Windows Installer application programming interface (API).

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Balaji
Posts: 53
Joined: Wed May 06, 2020 9:15 am

Re: Uninstall particular MSI from bootstrapper EXE

Hi Catalin,
I have gone through this. But, just I want to confirm it.

Thanks,
Balaji
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall particular MSI from bootstrapper EXE

Hello Baji,
I have gone through this. But, just I want to confirm it.
Sure thing. It is always good to double check something, indeed.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Balaji
Posts: 53
Joined: Wed May 06, 2020 9:15 am

Re: Uninstall particular MSI from bootstrapper EXE

Hi Catalin,
Yes, you got my point.

One more query regarding same.

If I have unchecked "Register Product windows installer" from product details tab, can I use upgrade/Downgrade feature for bootstrapper and it's prerequisites?

Thanks,
Balaji
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall particular MSI from bootstrapper EXE

Hello Balaji,

As explained in our "Product Details Page" article:
Register product with Windows Installer.
This option registers the product with Windows Installer.

If this option is not checked you cannot remove, repair or reinstall the application by using the Control Panel, the Windows Installer command-line options or the Windows Installer application programming interface (API).
With that being said, I'm afraid the upgrade/downgrade process will fail in this scenario.

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

Return to “Common Problems”