I am doing a windows application using C# and VS 2005. I would like to know if there is a .net framework 2.0 has been installed on a computer or not. If it has not been installed, the program will install it, otherwise just ignore it. How can I use C# to know if .net framework 2.0 has been installed or not? Thanks.
Scripting languages are a dime a dozen. You should probably pick something that makes sense within the context of what you're trying to do. Use this for example.
Hans Passant.
Proposed as answer byjack 321Wednesday, September 3, 2008 6:14 AM
Marked as answer byjack 321Thursday, September 4, 2008 2:24 AM
You've got a chicken and egg problem. You can't use C# to check if .NET is installed, C# requires .NET to be installed. You could use a scripting language to check if the HKLM\Software\Microsoft\.NETFramework\v2.0.50727 registry key is present. Hans Passant.
Scripting languages are a dime a dozen. You should probably pick something that makes sense within the context of what you're trying to do. Use this for example.
Hans Passant.
Proposed as answer byjack 321Wednesday, September 3, 2008 6:14 AM
Marked as answer byjack 321Thursday, September 4, 2008 2:24 AM