Host or HOST files in Registry

  • Thread starter Thread starter Sharon
  • Start date Start date
S

Sharon

Will someone please clarify what the Registry files
should look like, namely the "host" files?

Thanks, I appreciate the explaination.
 
Sharon said:
Will someone please clarify what the Registry files
should look like, namely the "host" files?

The registry is viewed and updated via the regedit command.
The user does not have to have any notion of the underlying files
which are used to implement the registry and these vary depending
on the OS anyway.

I suspect you are asking about a HOSTS file.
Again the location of the HOSTS file is OS dependent
though it may also be influenced by a recent bit of malware (Trojan)
called QHosts. From information about that exploit you may learn
about the only factor which links both the HOSTS feature and the
registry, this value:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath

< http://securityresponse.symantec.com/avcenter/venc/data/trojan.qhosts.html >


HOSTS provides a way to override a normal DNS lookup.
You would do this if your DNS was not working correctly.
Most OS have a sample file called HOSTS.SAM which contains
comments in it to explain how it may be used. Note that the operational
HOSTS file has no extension and is always fully uppercased.

Thanks, I appreciate the explanation.

You're welcome but if this is the Sharon who is trying to access the site:
< http://www.melorheostosis.org >
we already know that your DNS is working to some extent because you are
able to view the source of that site's frameset. I gave some suggestions
for where you could go from there but haven't seen any feedback.


HTH

Robert Aldwinckle
---
 
Oh, Well Done, Jethro!

--
Please respond in the same thread.
Regards, Jim Byrd, MS-MVP



In
 
Well, Jethro, since you asked. While XP per se may not distinguish between
upper and lower case, there's evidently code somewhere that does. While it
may appear to work OK, and will most of the time in some fashion when named
lower case in W98x, Win2k and XP, a good bit of experimentation has been
done in these OS's which shows that it will respond erratically upon
occasion (blocking incorrectly, translating IPs incorrectly, and/or freezing
the browser) if not named upper case. I (and some other MVPs who've looked
at it) have never been able to determine the specific cause, but that does
appear to be the case. (I found, for example, that I had to add a little
..bat file (HostsSuspend.bat) to reset the name to all caps after using
HostsToggle in order to get proper subsequent operation. I've since gone to
RenHosts.bat, http://www.mvps.org/winhelp2002/RenHosts.bat available with
some other good data about using HOSTS files for blocking malware here:
http://www.mvps.org/winhelp2002/hosts.htm)

See here, for example:
http://support.microsoft.com/default.aspx?scid=kb;en-us;228760


"4. Save the HOSTS file.

NOTE: This file must be upper case, and should NOT have a file name
extension. In other words, the file name should simply be HOSTS."


YMMV, and, of course, you're free to choose to name it as you please.


Does that explain it a little?


--
Please respond in the same thread.
Regards, Jim Byrd, MS-MVP



In
 
JethroUK© said:
just wondering why the emphasis on upper case

Maybe it's a JIC thing. E.g. if the application which uses HOSTS
is doing a case sensitive check it would need to see HOSTS exactly
no exceptions.

I thought that it might be because originally in Windows 95 case sensitive
filenames were an add-on which made use of unique 8.3 names usually
constructed by using tilde and numbers. But in XP at least that doesn't
seem to be done any more as long as a filename is 8 characters or less.
E.g. it doesn't seem to make any difference whether lowercase characters
are used in it, dir/x only shows one filename, not two. I think at one time
Hosts (say) might have been stored as HOSTS~1. If that was the thing
that our hypothetical application was matching and it was paying attention
to the length it wouldn't match HOSTS either.


FWIW

Robert Aldwinckle
---
 
Back
Top