We are building an installer that enables Internet Information Services (IIS) and installs .NET 6 hosting bundle in a windows 10 machine. We are using Advanced installer to build our installer.
We are facing a problem if the host machine already has a higher version of .NET hosting bundle installed e.g. version 6.0.9. And if our installer tries installing a lower version of .NET hosting bundle e.g. 6.0.4, it gets canceled because a higher version is already installed on that machine. From this documentation, we found that we need to install/repair .NET hosting bundle after the installation of Internet Information Services (IIS) otherwise Internet Information Services won't work. Because the installation of 6.0.4 is getting canceled, IIS is not working.
Our approach: what we want to do is if version 6.0.4 gets canceled because of a higher version of the .NET hosting bundle. We want to repair the existing 6.0.9 version installed on the host machine.
How can we repair a higher version of .NET hosting bundle installed on the host machine without knowing the location of the .NET hosting bundle .exe file?
Please also suggest if there is a better alternative approach to resolve the issue.