Tim Hibbard

Software Architect for EnGraph software
Where's Tim


News





Add to Google



My Stats

  • Posts - 587
  • Comments - 304
  • Trackbacks - 513

Twitter












Tag Cloud


Recent Comments


Recent Posts


Article Categories


Archives


Post Categories


Image Galleries


EnGraph Blogs


Links


Other


Roll



By default, if you try to modify your hosts file in Vista, it will not let you save it.  It tells you that you don't have permission.  To successfully modify the hosts file, run notepad.exe as an administrator and open the file.

1)  Browse to Start -> All Programs -> Accessories
2)  Right click "Notepad" and select "Run as administrator"
3)  Click "Continue" on the UAC prompt
4)  Click File -> Open
5)  Browse to "C:\Windows\System32\Drivers\etc"
6)  Change the file filter drop down box from "Text Documents (*.txt)" to "All Files (*.*)"
7)  Select "hosts" and click "Open"
8)  Make the needed changes and close Notepad.  Save when prompted.

 Check out Where's Tim, real-time GPS on Google Maps!

Technorati tags: , ,

posted @ Wednesday, December 13, 2006 6:00 PM | Filed Under [ Vista ]

Comments

Gravatar # re: Changing your hosts file in Vista
Posted by StuGazzO on 12/16/2006 5:29 AM
Thank you! Thank you! Thank you!
I'm glad the security is tighter on the hosts file, but I couldn't find a solution until I found your post.
Now if I could only find a way (if at all) to customize my Explorer toolbar (like I used to be able to in XP). Any suggestions?
Gravatar # re: Changing your hosts file in Vista
Posted by Sercone on 12/25/2006 11:42 PM
Thank you!
Gravatar # re: Changing your hosts file in Vista
Posted by Henri on 1/1/2007 5:39 AM
thanks alot
Gravatar # re: Changing your hosts file in Vista
Posted by Tariq on 1/2/2007 12:23 PM
Tim does Vista read the entries in the host file, I added a couple of entries, but it looks like vista isnt picking them up. if i ping the entries i have added, it returns could not find host ...
Gravatar # re: Changing your hosts file in Vista
Posted by Tariq on 1/2/2007 12:29 PM
Update,
I figured it out, I was editing a copy of the hosts file in a separate directory (e.g. c:\temp) and the replacing the original with that and Vista wasn't picking up the entries (not sure why)

but if I follow the approach above and edit the origianl, it works fine.
Gravatar # re: Changing your hosts file in Vista
Posted by Last.2.Know on 1/3/2007 8:37 AM
Thanks Tim.

The extra security in Vista is nice, but damned annoying when it makes every file Read Only and you can't change what you want.

Hey-ho.
Gravatar # re: Changing your hosts file in Vista
Posted by Curbob on 1/15/2007 4:12 PM
Thanks Tim,

I haven't played with Vista yet but I know this info will help in the future
Gravatar # re: Changing your hosts file in Vista
Posted by Ashish on 1/21/2007 1:42 PM
Hey Tim! Thanks for the heads up! I've got a long way to go before we get reasonably proficient at this... phew...
Gravatar # re: Changing your hosts file in Vista
Posted by Ullas on 2/1/2007 2:15 AM
Thanks a lot
Gravatar # re: Changing your hosts file in Vista
Posted by Viper on 2/2/2007 5:41 PM
Hi can someone copy and paste Vista's host file please?

I deleted mine+ lost tthe back up copy i had so I had to make a basic one to get back on the net.

Thanks
Gravatar # re: Changing your hosts file in Vista
Posted by Tim Hibbard on 2/3/2007 1:28 AM
Viper - Here you go.

# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
::1 localhost
Gravatar # re: Changing your hosts file in Vista
Posted by Viper on 2/3/2007 2:06 PM
Thank you very much
Gravatar # re: Changing your hosts file in Vista
Posted by Jim on 2/4/2007 4:11 PM
Hey guys, heres a better way.

Create a new short cut pointing to:

C:\Windows\System32\notepad.exe C:\Windows\System32\drivers\etc\hosts

Open the properties and click the Advanced button on the Shortcut tab and select Run As Administrator.

That's it, this will allow you to edit the file in place in notepad and open the hosts file automatically.
Gravatar # re: Changing your hosts file in Vista
Posted by cartel on 2/15/2007 5:44 PM
use spybot s&d to change hosts file

Gravatar # re: Changing your hosts file in Vista
Posted by Cartel on 2/15/2007 5:51 PM
by the way, do I need the 2 entries that vista has default?
Will it hurt to remove them?


Gravatar # re: Changing your hosts file in Vista
Posted by Nick on 2/18/2007 8:39 PM
Thanks Jim
Gravatar # re: Changing your hosts file in Vista
Posted by Mahomed on 2/19/2007 5:19 AM
Thanks Tim. This was a big help.
Gravatar # re: Changing your hosts file in Vista
Posted by John on 2/20/2007 5:50 AM
Tim,
What if i wanted to automate updating the hosts file? I have certain hosts needed by my users that are not in my DNS. i update their hosts files using the logon script.
Thanks...
Gravatar # re: Changing your hosts file in Vista
Posted by Jonathan on 2/20/2007 6:16 AM
MS page on how to modify hosts http://support.microsoft.com/kb/923947
Gravatar # re: Changing your hosts file in Vista
Posted by jo on 4/1/2007 9:14 AM
127.0.0.1 serial.alcohol-soft.com # alcohol 120%
127.0.0.1 alcohol-soft.com # alcohol 120%
127.0.0.1 images.alcohol-soft.com # alcohol 120%
127.0.0.1 mermaidconsulting.dk # alcohol 120%
Gravatar # re: Changing your hosts file in Vista
Posted by Gergana Krumova on 4/11/2007 2:21 AM
Thanks. You saved my time!
Gravatar # re: Changing your hosts file in Vista
Posted by obi on 4/12/2007 2:09 AM
Thanks a million. Your way of editing the hostfile is much easier for me.
Gravatar # re: Changing your hosts file in Vista
Posted by Your Momma on 5/7/2007 11:14 AM
This could be used to block someone from accessing the router. If that person keeps going into it to mess with the settings and change the password.

127.0.0.1 192.168.1.1
Gravatar # re: Changing your hosts file in Vista
Posted by Your Momma on 5/7/2007 11:16 AM
Also use this to block that annoying myspace.

127.0.0.1 www.myspace.com
Gravatar # re: Changing your hosts file in Vista
Posted by Your Momma on 5/7/2007 11:17 AM
Also I want to block the ms updates. Does anyone know the servers they use? Something like update.microsoft.com?
Gravatar # re: Changing your hosts file in Vista
Posted by Ahmmad on 5/8/2007 7:11 AM
I will try the host file edit solution and am sure it will work. Thanks for smoothening the rough ride.

Gravatar # re: Changing your hosts file in Vista
Posted by dan pincu on 6/18/2007 4:34 PM
I am logged in as Administrator, but everytime I try to save the Hosts file, the system tells me that I do not have permission because I am not an administrator.

What more can I do?
Gravatar # re: Changing your hosts file in Vista
Posted by Tom Perry on 6/24/2007 2:26 PM
Thank You!
Gravatar # re: Changing your hosts file in Vista
Posted by Nelson Cysneros on 7/4/2007 3:01 AM
Thanks!!! Just spent a lot of time trying to figure this out.
Gravatar # KOMMANDS!!!
Posted by 13urn on 7/5/2007 9:09 AM
Iwe need some commands to difriend things! Can u help me? I need a command for shutting down a pc through Ip/Pc's Name direktly!
and stuf like that thx! I hope i soon will here from u!!! Now i can just say! Windows + r Shutdown /r!!! Im Out bye!!!
Gravatar # re: Changing your hosts file in Vista
Posted by Guido on 7/15/2007 1:31 PM
Really annoying, even if you log into an administrator account you have to run Notepad explicitly as administrator. It seems it runs with lower privileges otherwise. Don't ask me...

Thanks for the link to the MS page too, would've looked forever without that! Tight security is good and all, but that's just annoying.
Gravatar # re: Changing your hosts file in Vista
Posted by Raghu on 7/21/2007 10:44 PM
Thanks a lot. This helped me lot
Gravatar # re: Changing your hosts file in Vista
Posted by john on 8/8/2007 6:06 AM
there is no system32 folder in mine - only system and no host file in there - using vista home premium - am I missing something?
Gravatar # re: Changing your hosts file in Vista
Posted by Diablos on 8/9/2007 7:16 AM
You guys are legends than
Gravatar # re: Changing your hosts file in Vista
Posted by Aaron on 8/13/2007 11:53 AM
Thanks!
Gravatar # re: Changing your hosts file in Vista
Posted by david on 8/14/2007 5:21 AM
I'm having a different problem after recenty security (pre-SP1) updates... I can ping the server I have put in the HOSTS file, but when trying to access it by "cd \\server", this times out... when I do "cd \\212.222.111.33" , it works..

HOSTS file:

127.0.0.1 localhost
::1 localhost
212.222.111.33 server

PS: server is accessible via Hamachi.. really, really strange.. it seems they cannot do anything right.. Vista connectivity is really shitty (dropping the connection etc.) - but that's different story
Gravatar # re: Changing your hosts file in Vista
Posted by Nick on 8/16/2007 8:57 AM
Thank you for posting this. So helpful!
Gravatar # re: Changing your hosts file in Vista
Posted by Stee on 8/21/2007 9:15 AM
I'm seeing an even odder problem, relating to the hosts file. Maybe this is some 64bit issue, but I don't have a hosts file!
Don't even have a "etc" folder, all I have in C:\Windows\system32\drivers\ is
en-US,
UMDF

Anyone come across this?
Gravatar # re: Changing your hosts file in Vista
Posted by Lance on 8/30/2007 3:48 PM
"I'm seeing an even odder problem, relating to the hosts file. Maybe this is some 64bit issue, but I don't have a hosts file!
Don't even have a "etc" folder, all I have in C:\Windows\system32\drivers\ is
en-US,"

This happened to me when I was running a third party file explorer.
Gravatar # re: Changing your hosts file in Vista
Posted by Admin on 9/9/2007 4:40 AM
Ok ok lets stop talking about this and look on about puberty
Gravatar # re: Changing your hosts file in Vista
Posted by meena on 10/8/2007 2:50 PM
Hey Tim, Thank you for the post.
Gravatar # re: Changing your hosts file in Vista
Posted by gnedel on 10/14/2007 1:46 AM
Thanks! Right on the money.
Gravatar # re: Changing your hosts file in Vista
Posted by RandyR on 10/18/2007 6:15 PM
i get this when i run the search for host on vista in Imhost?
#
# This is a sample LMHOSTS file used by the Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to computernames
# (NetBIOS) names. Each entry should be kept on an individual line.
# The IP address should be placed in the first column followed by the
# corresponding computername. The address and the computername
# should be separated by at least one space or tab. The "#" character
# is generally used to denote the start of a comment (see the exceptions
# below).
#
# This file is compatible with Microsoft LAN Manager 2.x TCP/IP lmhosts
# files and offers the following extensions:
#
# #PRE
# #DOM:<domain>
# #INCLUDE <filename>
# #BEGIN_ALTERNATE
# #END_ALTERNATE
# \0xnn (non-printing character support)
#
# Following any entry in the file with the characters "#PRE" will cause
# the entry to be preloaded into the name cache. By default, entries are
# not preloaded, but are parsed only after dynamic name resolution fails.
#
# Following an entry with the "#DOM:<domain>" tag will associate the
# entry with the domain specified by <domain>. This affects how the
# browser and logon services behave in TCP/IP environments. To preload
# the host name associated with #DOM entry, it is necessary to also add a
# #PRE to the line. The <domain> is always preloaded although it will not
# be shown when the name cache is viewed.
#
# Specifying "#INCLUDE <filename>" will force the RFC NetBIOS (NBT)
# software to seek the specified <filename> and parse it as if it were
# local. <filename> is generally a UNC-based name, allowing a
# centralized lmhosts file to be maintained on a server.
# It is ALWAYS necessary to provide a mapping for the IP address of the
# server prior to the #INCLUDE. This mapping must use the #PRE directive.
# In addtion the share "public" in the example below must be in the
# LanManServer list of "NullSessionShares" in order for client machines to
# be able to read the lmhosts file successfully. This key is under
# \machine\system\currentcontrolset\services\lanmanserver\parameters\nullsessionshares
# in the registry. Simply add "public" to the list found there.
#
# The #BEGIN_ and #END_ALTERNATE keywords allow multiple #INCLUDE
# statements to be grouped together. Any single successful include
# will cause the group to succeed.
#
# Finally, non-printing characters can be embedded in mappings by
# first surrounding the NetBIOS name in quotations, then using the
# \0xnn notation to specify a hex value for a non-printing character.
#
# 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
#
# #BEGIN_ALTERNATE
# #INCLUDE \\localsrv\public\lmhosts
# #INCLUDE \\rhino\public\lmhosts
# #END_ALTERNATE
#
# In the above example, the "appname" server contains a special
# character in its name, the "popular" and "localsrv" server names are
# preloaded, and the "rhino" server name is specified so it can be used
# to later #INCLUDE a centrally maintained lmhosts file if the "localsrv"
# system is unavailable.
#
# Note that the whole file is parsed including comments on each lookup,
# so keeping the number of comments to a minimum will improve performance.
# Therefore it is not advisable to simply add lmhosts file entries onto the



but if i add the lines to log onto the private Lineage 2 server it wont work? I am using the notepad as admin, and get no error message when i make the change and save. I saw a copy of what is supose to be the vista host here in these posts yet mine looks total different?
Help please...
Gravatar # re: Changing your hosts file in Vista
Posted by Scott on 10/20/2007 11:54 AM
Thanks man!
Gravatar # re: Changing your hosts file in Vista
Posted by anton on 10/23/2007 11:13 PM
thank you very much that was very helpful.
Gravatar # re: Changing your hosts file in Vista
Posted by Aart on 11/28/2007 7:11 AM
Thanks for the helpful advise! Greatly appreciated.
Gravatar # Changing your hosts file in Vista
Posted by Changing your hosts file in Vist on 12/17/2007 2:27 PM
is there a command i can type in 'run' (winkey + r) that opens it in notepad like: open C:\Windows\System32\Drivers\etc -notepad' or summin like that?

Gravatar # re: Changing your hosts file in Vista
Posted by rolex lover on 12/20/2007 6:46 AM
thx
Gravatar # re: Changing your hosts file in Vista
Posted by Steven on 1/20/2008 8:03 AM
Hi can anybody help me i am having problem with signing in to Live Messenger and the only reason is related to the host file that i have PLSSS help me cause eventhough i re-instal the program it still doesn't work
Gravatar # re: Changing your hosts file in Vista
Posted by repair on 2/10/2008 5:16 PM
10X 10X
LISA
Gravatar # re: Changing your hosts file in Vista
Posted by youtube-novela-acorralada on 2/15/2008 8:32 PM
nice post
lisa
Gravatar # re: Changing your hosts file in Vista
Posted by Danylo on 2/27/2008 12:42 PM
Thank you, Man. You saved my day.

PS. I hate Vista.
Gravatar # re: Changing your hosts file in Vista
Posted by Bueno on 3/2/2008 8:16 AM
Obrigado (I mean thanks).
Gravatar # re: Changing your hosts file in Vista
Posted by Alpay on 3/17/2008 8:31 AM
Hi,

First result in Google, direct solution. Thank you very much.

http://www.unofficialmac.com
Gravatar # re: Changing your hosts file in Vista
Posted by Natalie on 4/3/2008 5:37 AM
I just wanted to say thank you. I have been going crazy trying to access a blocked website and tried everything I could think of! Your instructions were simple to follow (even for a computer novice like me)and worked :0)

THANK YOU!
Gravatar # re: Changing your hosts file in Vista
Posted by nicolelink on 4/11/2008 2:50 AM
水族,
魚池,
交友,
魚缸,
商業登記,
Office Relocation,
Accounting Service,
二手鋼琴,
拉丁舞課程,
Gravatar # re: Changing your hosts file in Vista
Posted by SEOTIPS on 4/16/2008 10:10 PM
First result in Google, direct solution. Thank you very much.


Gravatar # re: Changing your hosts file in Vista
Posted by Hayley on 5/5/2008 4:55 PM
THANK YOU!!!

Seriously, Easy instructions, I managed to do what I needed to get on a site I couldn't (for some reason)

Thanks!
Post a comment





 

Please add 2 and 6 and type the answer here: