'Where's my host file?
'Joe Zeiler
'09/30/03
'v1.0
Option Explicit
Dim WSHShell, RegKey, path, Result, RegKey2, root, fullpath
Set WSHShell = CreateObject("WScript.Shell")
RegKey = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath"
path = WSHShell.RegRead(RegKey)
RegKey2 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRoot"
root = WSHShell.RegRead(RegKey2)
fullpath = Replace(path, "%SystemRoot%", root)
Result = MsgBox("The path to your hosts file is " & fullpath & "\hosts", 0)