dretzlaff17
dretzlaff17

Reputation: 1719

How to detect .NET Framework installation on a machine using VB6

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?

Upvotes: 1

Views: 2483

Answers (3)

dretzlaff17
dretzlaff17

Reputation: 1719

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

Upvotes: 2

Arseny
Arseny

Reputation: 7351

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

Upvotes: 2

Related Questions