Jul 11

You can use the following JavaScript code in a web page to determine which versions of .NET are installed on a client PC:

<script language=”JavaScript” type=”text/javascript”>
var a = navigator.userAgent.match(/.NET CLR [0-9.]+/g);
if (a == null)
  document.write( “Microsoft .NET is not installed on your PC” )
else
{
  document.write( “The following versions of Microsoft .NET are installed on your PC:<br/>” )
  for (i = 0; i < a.length; ++i)
  {
     document.write( a[i] )
     document.write( “<br/>” )
  }    
}
</script>

Here is the code in action:

Share and Enjoy:
  • Twitter
  • Facebook
  • Reddit
  • LinkedIn
  • Digg
  • DotNetKicks
  • StumbleUpon
  • Slashdot
  • Technorati
  • Google Bookmarks
  • Print
  • email

Article published on July 11, 2007




5 Responses to “Determine Installed .NET Versions from a Web Page”

  1. Mr Speaker Says:

    Great tips ’round here! Keep ’em coming!

  2. Tim Yen Says:

    This jscript doesn’t appear to work on firefox, any ideas why?

  3. timm Says:

    Unfortunately this only works on Internet Explorer. If anyone knows how to make this work on FireFox, please comment!

  4. How do I know if I already have .NET? « Says:

    […] do I know if I already have .NET? By sadanandms We have queried your Web browser, and it tells us that you have the following .NET versions installed on your PC (note this only […]

  5. What is the .NET architecture? « T. Nayak Says:

    […] have queried your Web browser, and it tells us that you have the following .NET versions installed on your PC (note this only […]

Leave a Reply