Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / .NET

A safe way to get the user to check if the .NET framework is installed

5.00/5 (1 vote)
30 Apr 2011CPOL 13.2K  
Two alternate possibilities:One is conceptual. Consider why you are asking the user. Is it because you have a program or website that requires a specific version? If so, you are expected to distribute the proper redist package with your application.Also conceptually, instead of making...
Two alternate possibilities:

One is conceptual. Consider why you are asking the user. Is it because you have a program or website that requires a specific version? If so, you are expected to distribute the proper redist package with your application.

Also conceptually, instead of making the user jump through hoops, why not write a native application that presents the information? I mean, you probably are planning on installing software on the users machine anyway, why not have a program that can do this?

http://support.microsoft.com/kb/318785[^]

Finally, if you just want a list of installed versions have the user execute the following at the command prompt:

reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP" /v Version /s

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)