tags:

views:

34

answers:

3

Using Visual Basic 6, what is the best way to detect if the .NET Framework is installed on a client machine, and what versions of .NET are installed?

+4  A: 

Check the subfolders in the %systemroot%\Microsoft.NET\Framework folder.

SLaks
+1 i always do it this way. so simple!
Andrey
+2  A: 

you may take this information from windows system registry. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\

Arseny
A: 

I was able to answer my own question with the following code based.

 Dim strFrameworkDir As String

    strFrameworkDir = Environ$("systemroot") & "\Microsoft.NET\Framework\v3.5"

    If Dir$(strFrameworkDir, vbDirectory) = vbNullString Then

        MsgBox ".NET Framework 3.5 Must be Installed on this machine!"         
        End

    End If
dretzlaff17