Before starting my application (on Form Load) I want to check and ensure that the .NET framework (3.5 or higher) are installed on the machine – if not I want to prompt the user to download and install it (simple MessageBox with a INTERNET LINK to the Microsoft WebPage would be the best idea no?)
So, this actually entails two questions…
a) How do I DETERMINE IF .NET FrameWork 3.5 or higher are installed? (I don’t trust or want to just look for the C:\Program Files\Microsoft.NET folder, seems error-prone no?)
Seeing as this is so very crucial there must be a nice way in C# to determine what version of .NET the user has running on his machine? I just have no clue how..
b) HOW do I paste an INTERNET LINK (hyperlink?) in a MessageBox? So that if the user does NOT have the .NET framework (1.1 or 2.0) installed I can have them simply click on the link to go download it?
Any help/hints would be greatly appreciated.
Thanks,
Din
a) You would have to bootstrap the program with a non .NET language (C++, VB6, etc) instead of Form_Load (other posters are correct – if the framework isn’t installed, the .NET program won’t run). An example is here:
http://www.codeproject.com/KB/mcpp/DotNetTester.aspx
b) You can’t put a hyperlink in a MessageBox, so you would have to create your own popup dialog (a form). EDIT: That form / dialog would have to be in the bootstrap program.