Jump to content

[VB.NET]mInetInfo

- - - - -

  • Please log in to reply
No replies to this topic

#1
kresh7

kresh7

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 661 posts
Ok here this is just a small function that retrieves some Internet Explorer information shows you your proxy settings,proxy enabled or not,and your useragent some easy registry keys which get read here is it.

Option Explicit On

Imports Microsoft.Win32.RegistryKey

'---------------------------------------------------------------------------------------

' Module      : mInetInfo

' DateTime    : 09/02/2010  05:18AM

' Author      : Kreshnik Hasanaj

' Mail        : [email]kresha7@hotmail.com[/email]

' Purpose     : Retrieve some Internet Settings 

' Use         : On your own risk

'---------------------------------------------------------------------------------------

Module mInetInfo

    Public Function GetProxySettings() As String

        Dim RegKey As String

        RegKey = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", Nothing)

        RegKey = Replace(RegKey, ";", vbNewLine)

        GetProxySettings = RegKey

    End Function

    Public Function IsProxyEnabled() As Boolean

        Dim RegKey As String

        RegKey = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", Nothing)

        IsProxyEnabled = CBool(RegKey)

    End Function

    Public Function InetUserAgent() As String

        Dim RegKey As String

        RegKey = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "User Agent", Nothing)

        InetUserAgent = RegKey

    End Function

End Module

Posted Image




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users