Jump to content
Sign in to follow this  
oneoone

how do i use a Host file ?

Recommended Posts

Hi,

I have got a copy of cs6 off cyberwarez and it has a host file to block it going online, how do i use it once i have install the program.

Thanks

oneoone

Share this post


Link to post
Share on other sites

The hosts file is a computer file used in an operating system to map hostnames to IP addresses. The hosts file is a plain-text file and is conventionally named hosts.

Heres a Wiki

Try using "HostsXpert" its easy. There r otherz but I have used "HostsXpert" B4 & I like it & its free.

I dont know what this file that U have looks like but U should b able 2 edit it. if so edit it @ copy the values to Ur host file.

I would make a copy of the original host file on Ur machine 1st.

Just in case Ur unhappy with the results or whatever.

  • Like 3

Share this post


Link to post
Share on other sites

I was just reading this & thought it might give U somemore insight on the hosts.txt file on a x64 bit platform.

The subtle differences between 32-bit and 64-bit Windows present so many intricacies and pitfalls that even Microsoft employees seem to have trouble getting it right. I just stumbled upon a KB article that describes how to reset the hosts file to its original state. The topic alone is funny enough - it is not as if the default hosts file contained great amounts of data. An entry for localhost (IPv4 and IPv6) is all you need, and on Windows 7 / Server 2008 R2 not even that. But anyhow, there seem to be enough people asking MS support for this or they would not have troubled with creating a package (ResetHOSTSFileBackToDefaults.MSI) that basically empties the hosts file.

Is Hosts 64-bit or 32-bit?

 

As always, I am more interested in what the package does, and Microsoft is kind enough to explain that in most "Fix it for me" articles. As you probably know, the hosts file was, is and probably will always be located in %systemroot%\system32\drivers\etc. Simple enough. But wait: 64-bit systems have two system32 directories: one for 64-bit processes and the other for 32-bit processes. Now, where would the hosts file be located - or are there even two (potentially different) files?

The answer is: no, the hosts file exists only once on x64 Windows. And it is right where it belongs, in the 64-bit system32 directory. But where is that directory located on disk? Is it the one natively called system32, or is it SysWOW64?

Redirection Confusion

 

This is where confusion kicks in. Many people, including the person writing MS KB article 972034, see the number "64" in the name of the folder SysWOW64 and think: yes, that must be the 64-bit version of system32. Nice thinking, but wrong. It is exactly the other way round. For compatibility reasons, the name of the system32 folder did not change in Windows x64, although on 64-bit platforms the folder does not contain 32-bit but 64-bit executables! That leaves the question of where to put the 32-bit files that 32-bit processes need - and also expect to find in system32? Obviously, the same DLL cannot be present twice in the same folder.

The requirement of two different system32 directories was solved by redirection. Actually there are two independent folders in any x64 installation: system32 and SysWOW64. The latter is shown to 32-bit processes under the name system32. 64-bit processes do not use SysWOW64.

How to Get to and Edit the Hosts File

 

If you want to edit the hosts file, you first need to locate and open it - on Vista and newer with UAC enabled from an elevated process (with admin rights). The procedure is a little tedious. Here is how to do it with 64-bit Notepad:

  • Click on the Start button, type "notepad" and press CTRL+SHIFT+ENTER. Acknowledge the UAC dialog.
  • Type CTRL+O. Navigate to C:\Windows\System32\drivers\etc. Select "All Files" in the bottom right corner.
  • Now you see the hosts file. Select and open it. Make your changes and save it.

If you want to access hosts from a 32-bit process, use one of the following paths. Please note that in both cases the full path must be used. Navigating to "etc" from the root does not work (because System32 is redirected and Sysnative is not shown in directory listings).

  • %Windir%\System32\drivers\etc. This works because file system redirection is disabled for the "etc" directory and thus accessing the 64-bit System32 works from a 32-bit process.
  • %Windir%\Sysnative\drivers\etc. Sysnative is an alias that can only be used from 32-bit processes to access the 64-bit System32 directory.

  • Like 1

Share this post


Link to post
Share on other sites

What exists in the host file as default are usually examples that are commented out from beeing executed such as the following:

 

# The following example illustrates all of these extensions:
#
# 102.54.94.97	 rhino		 #PRE #DOM:networking  #net group's DC
# 102.54.94.102    "appname  \0x14"				    #special app server
# 102.54.94.123    popular		    #PRE			 #source server
# 102.54.94.117    localsrv		   #PRE			 #needed for the include

 

The "#" in front of eash entry tells windows to ignore the line altogether. Entering a line manually is fine but nust exclude the #.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×