How to find out if framework is installed?

  • Thread starter Thread starter Havic Ploccin
  • Start date Start date
H

Havic Ploccin

I need an automatic way of discovering (from an IE page, via script) if the
..NET framework is installed on a client machine. How do I do this?
 
Havic,

You can use the userAgent property. For example:

<script language="JavaScript">

if( isDotNetInstalled() ) {
document.write( ".NET installed" );
} else {
document.write( ".NET not installed" );
}

function isDotNetInstalled()
{
var ua = window.navigator.userAgent;

return ( ua.indexOf( ".NET CLR" ) > 0 );
}

</script>

For more information please see the following document:

userAgent Property
http://msdn.microsoft.com/library/d...thor/dhtml/reference/properties/useragent.asp

Regards,

Gabriele
 
Back
Top