--- title: "How to: Detect Whether the .NET Framework 3.0 Is Installed" ms.date: "03/30/2017" helpviewer_keywords: - "WinFX Runtime user-agent string" - "presence of WPT [WPF], detecting" - "detecting WPF presence [WPF]" ms.assetid: 7f71d652-1749-4379-945a-aa2e3994cb43 --- # How to: Detect Whether the .NET Framework 3.0 Is Installed Before administrators can deploy Microsoft .NET Framework applications on a system, they must first confirm that the .NET Framework runtime is present. This topic provides a script written in HTML/JavaScript that administrators can use to determine whether the .NET Framework is present on a system. > [!NOTE] > For more detailed information on installing, deploying, and detecting the Microsoft .NET Framework, see the discussion in [Deploying Microsoft .NET Framework Version 3.0](/previous-versions/dotnet/articles/aa480198(v=msdn.10)). ## Detect the ".NET CLR" User-Agent String When .NET Framework is installed, the MSI adds ".NET CLR" and the version number to the UserAgent string. The following example shows a script embedded in a simple HTML page. The script searches the UserAgent string to determine whether .NET Framework is installed, and displays a status message on the results of the search. ```html Test for the .NET Framework 3.0
``` If the search for the ".NET CLR " version is successful, the following type of status message appears: `This machine has the correct version of the .NET Framework 3.0: 3.0.04425.00` `This machine's userAgent string is: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04425.00).` Otherwise, the following type of status message appears: `This machine does not have correct version of the .NET Framework 3.0.` `This machine's userAgent string is: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727).`