How can I check whether the. net framework is installed on my computer?

Source: Internet
Author: User
Tags mscorlib

Check whether MSCOREE is contained in/% windir %/System32. if the DLL file exists, the system has installed the FM HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft /. under NETFramework/policy, you can check the specific FM functions installed on the machine: Public Function DoesDotNETFrameworkExist (ByVal udeVersion As DotNETFrameworkVersions) As Boolean

Dim o_blnRet As Boolean
Dim o_strRet As String

With New cRegistry
. HKey = HKEY_LOCAL_MACHINE
. KeyPath = "Software/Microsoft/. NETFramework"
If. DoesKeyExist () Then
. KeyPath = "Software/Microsoft/. NETFramework"
O_strRet = GetRegValue (. GetRegistryValue ("InstallRoot ",""))
O_blnRet = (o_strRet <> "")
If o_blnRet Then
With New cFileFuncs
Select Case udeVersion
Case dnfvV1
O_blnRet =. DoesFileExistEx (o_strRet & "v1.0.3705/mscorlib. dll ")
Case dnfvV1_1
O_blnret =. doesfileexistex (o_strret & "v1.1.4322/mscorlib. dll ")
Case dnfvvany
O_blnret =. doesfileexistex (o_strret & "v1.0.3705/mscorlib. dll ")
If o_blnret then
Else
O_blnret =. doesfileexistex (o_strret & "v1.1.4322/mscorlib. dll ")
End if
End select
End
Else

End if
Else
O_blnret = false
End if
End

Doesdotnetframeworkexist = o_blnret

End Function

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.