MSFN Forum: Hosts file - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Hosts file Changing the default location. Rate Topic: -----

#1 User is offline   herbalist 

  • paranoid independent
  • PipPipPipPipPip
  • Group: Members
  • Posts: 719
  • Joined: 15-December 06
  • OS:98
  • Country: Country Flag

Posted 22 December 2007 - 05:22 PM

Is the location of the hosts file on Win98 stored in the registry or hard coded? Can this be changed? If so, where?
Rick


#2 User is offline   ShadeTreeLee 

  • Junior
  • Pip
  • Group: Members
  • Posts: 81
  • Joined: 19-February 07

Posted 22 December 2007 - 08:59 PM

Since I have never seen a registry "tip" illustrating such a change, and also because each version of Windows seems to have a different place for storing it, I would assume it was hard coded into an essential core IE file such as Urlmon.dll until further notice.
Which means one would have to rewrite that file in order to change the location of the HOST file. I've no clue on how to begin to do that.

Why would you want to change the location of the HOST file?

#3 User is offline   herbalist 

  • paranoid independent
  • PipPipPipPipPip
  • Group: Members
  • Posts: 719
  • Joined: 15-December 06
  • OS:98
  • Country: Country Flag

Posted 22 December 2007 - 10:51 PM

Quote

Why would you want to change the location of the HOST file?

It's for a live CD experiment I'm working on. If the hosts file is left in the windows directory, it'll be part of the CD and uneditable. I'd like to be able to specify another location for it such as a separate CD or ideally, on an encrypted hard drive. It's not absolutely necessary but it fits with the overall idea I'm trying build. It would also help reduce the amount of space used on the CD.

I saw a string for specifying the location of LmhostFile in
My Computer\HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP
Tried adding a similar string for hosts but it didn't work.
Rick

This post has been edited by herbalist: 22 December 2007 - 10:58 PM


#4 User is offline   Mijzelf 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 447
  • Joined: 11-April 07

Posted 23 December 2007 - 08:00 AM

In lmhosts you can use a line #include=filename to include another file (usually somewhere on a server). Don't know if that works in hosts also.

#5 User is offline   MDGx 

  • 98SE2ME + 98MP10
  • Group: Super Moderator
  • Posts: 2,677
  • Joined: 22-November 04
  • OS:none specified
  • Country: Country Flag

Posted 24 December 2007 - 10:00 AM

To my knowledge HOSTS location in Windows 95/98/ME is "hardwired", and must be found in %windir% [usually C:\WINDOWS].

In NT4/2000/XP/2003/Vista HOSTS location can be changed by modifying this registry value:
http://www.microsoft.com/technet/prodtechn...ntry/33565.mspx

There are probably [?] network/internet applications which use customized HOSTS, and those probably have a way to specify HOSTS location, but I don't know of any.

IMHO:
Sounds like "include=filename" for custom HOSTS location might be a Perl, CGI or PHP application/config file. [?]

HTH

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy