William White
asked on
How to check is VB.net 3.0 is installed using a vb.net 2.0 application
All,
What code would i need to check to see if VB.net 3.0 is installed using a vb.net 2.0 application
What code would i need to check to see if VB.net 3.0 is installed using a vb.net 2.0 application
ASKER
i can see to use cregistry, i get cregistry is not declared what can i do to use that?
cRegistry is a wrapper class to access the registry. Here is what you need:
Public Shared Function ReadSetting(ByVal RK As RegistryKey, _
ByVal pstrSubKey As String, _
ByVal pstrName As String, _
ByVal pstrDefault As String _
) As String
Dim objKey As RegistryKey
Try
objKey = RK.OpenSubKey(pstrSubKey, False)
If objKey Is Nothing Then
objKey = RK.CreateSubKey(pstrSubKey)
End If
Return objKey.GetValue(pstrName, pstrDefault).ToString
objKey.Close()
Catch ex As Exception
Throw ex
Finally
objKey = Nothing
End Try
End Function
ASKER
so with this new code how do i apply it to find out if dot.net 3.0 is installed? i like the cregistry however i don't know how to use it. I am using VS2008
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for all the help
Open in new window