I have a an installer that is created from a setup project and built using MSBuild using the method found here. Whilst I set up the build process to generate the .msi file, I did not set up the project itself. One of the Launch conditions for the setup project is to check for the .Net framework version 4, and if it is not installed on the target machine, a message box is shown to the user asking if they want to visit the URL to download the .Net framework installation file. Should the user choose "yes" in the message box, then a browser is launched and loads the URL. Nice. The setup project also checks for another prerequisite that our product requires and does the same thing.
I am currently rewriting the installer using Wix and so far I have been able to get around a few minor problems (bearing in mind that I am still in the early stages of the installer as a whole). I've been able to recreate a check for the .Net Framework v4.0 and the other prerequisite software. I have also been able to show the message box asking the user if they want to launch a browser to the URL to download the other prerequisite software using a custom wix action.
The Problem
Wanting to do the same thing for the .Net Framework as the old installer does, I wrote another custom action to launch a browser to the .Net framework download URL. I compiled the custom actions and installer and removed the .Net framework from my test machine. I ran the installer on my test machine and the custom actions did not work, this being due to the .Net Framework no longer being installed on the test machine!!
The Question
Is there a way to recreate the way that the original setup project was able to check for the .Net framework, show the user a message box and then launch a browser to the download URL if the user chooses to do so? I've already been able to establish if the framework is not installed, just need a way to show the message box, launch a browser to the particular URL if the user chooses and prevent the installer from continuing.
or
Is there a way to run custom actions on a machine that does not have the .Net framework installed? (I'm guessing that the answer to this question is going to be no!)
as always, thanks in advance