查看完整版本: 如何检测电脑是否安装了.net framework

呱呱2008 2007-11-21 09:21

如何检测电脑是否安装了.net framework

  检查/%windir%/System32/下面是否含有MSCOREE.DLL文件如果有就所名已经安装了FM
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy下可以检查到机器上安装了那些版本的FM

具体函数:

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
页: [1]

查看完整版本: 如何检测电脑是否安装了.net framework