Imports System Imports System.IO Module Module1 Sub Main() Dim HostsText As String = Nothing Dim CheckHostsFile As String = "No" Using read As StreamReader = New StreamReader("C:\windows\system32\drivers\etc\hosts") Do Until read.EndOfStream HostsText = read.ReadLine().Trim() If HostsText.StartsWith("#") = False OrElse String.IsNullOrEmpty(HostsText) = False Then If HostsText.Contains("127.0.0.1") = False AndAlso HostsText.ToLower.Contains("localhost") = False Then Console.WriteLine(HostsText) CheckHostsFile = "Yes" End If End If Loop read.Close() End Using Console.WriteLine("Has the hosts file more then the localhost entry? " & CheckHostsFile) Console.ReadLine() End Sub End Module