How to: Edit Hosts File in Windows 7

Update: I am unable to import all comments from softgeeek.blogspot.com. So, I am including valuable comments as Updates with the name of commentator. Do not forget to read Updates.

For some reason, I needed to modify Hosts file in Windows 7. I went trough the same procedure which we use in XP and Vista but it was not working. In XP and Vista we follow the same procedure to edit hosts file. It should always be in mind that hosts file’s attributes are always “Read Only”. We have to open the Properties window by right clicking on hosts file and have to uncheck the Read Only attribute. Then open it in Notepad or any text editor and can modify it. But this procedure did not work when I tried to do on Windows 7.

It was in my mind that in Windows 7, we will follow same procedure and should be but it was not. I did right click on hosts file and opened the Properties window. I noticed that “Read Only” attribute is already unchecked. OK! so thought that it is good that one step is removed by default settings. I opened it with Notepad and edit it and tried to save. When wanted to save, Windows did not let me save it. Then I wanted to to replace original with Save As but again could not do.

It is clear that if we could not save it in Notepad or by using any other text editor, then what is the solution? I tried one small trick. Simply opened the Notepad and through File menu, I opened Hosts file. Now you will think that it is same again opening in Notepad but this trick worked. OK! I opened Hosts file in Notepad through File menu and edited it and saved it. I was able to save the edits in Hosts file through this trick.

Does not it feels silly that the same tool is used for editing in different ways. No, not even the different ways. One way the tool did not work and the other way it worked. I tried to justify this foolishness behavior by Googling the reason but could not. BTW, in Windows 7, Hosts file can be found here:

C:\windows\system32\drivers\etc\hosts

 

COMMENTS (from softgeeek.blogspot.com with name of commentator):

Wade: I found out how to use the HOSTS file in Windows 7. Seeing as how I just assumed and jumped the gun in setting up the HOSTS file from mvps.org, I didn’t know what it originally looked like. So I found how to reset it.
http://support.microsoft.com/kb/972034
They put in this new looking ::1 thing. Fine okay but I couldn’t modify the file as I didn’t have rights.
1) Open the properties of the HOSTS file at C:\windows\system32\drivers\etc\
2) Click the Security tab
3) You’re probably under the User account and not admin. If admin, I guess you can follow this the same way.
4) Edit that account
5) Click on the account to edit and allow at least to write (I set to write and modify).
Open it up and paste in what you want. Make sure to have
127.0.0.1
::1
at the top.
6) Run services.msc
7) restart the DNS service
For me, all those stupid ads are now blocked. Hope this helps.

Pedro Silva: 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”
1x1.trans How to: Edit Hosts File in Windows 7 Make the needed changes and close Notepad. Save when prompted.

Bryan: This didn’t work for me. However, this did:
open the start menu.
type in “notepad” into “Search Programs and Files” textbox.
Right-click “Notepad” and choose “Run as Administrator”
now repeat the steps above.

Akhtar Naqvi: For Windows 7: Click Start – search for “Notepad“, right-click and select “Run as Administrator“. This should launch notepad with elevated privileges. Now, open the host file from the File menu, edit and save.

Sarvesh: To edit the host file: Click Start – search for “Notepad“, right-click and select “Run as Administrator“. This should launch notepad with elevated privileges. Now, open the host file from the File menu, edit and save.


Incoming Search Terms:

host file windows 7 :-: hosts file windows 7 :-: windows 7 hosts file :-: windows 7 host file :-: host file in windows 7 :-: windows 7 hosts :-: edit hosts file windows 7 :-: hosts file in windows 7 :-: hosts windows 7 :-: how to edit hosts file in windows 7 :-: windows 7 edit hosts file :-: edit host file windows 7 :-:

If you find this article useful, share it on your favorite social network to let others know.

To receive instant updates, subscribe to our Secure RSS Feeds or Secure E-Mail Subscription provided by Google's FeedBurner.


Do you find this article helpful? Please, Donate us. Your donation will keep this site alive. Thank You.

 
1x1.trans How to: Edit Hosts File in Windows 7

You Will Also Like To Read:

  1. Change Windows XP Product Key
  2. Automatically Log On To a User Account in Windows Vista
  3. Change Windows Vista Product Key
  4. Windows Memory Diagnostic Tool
  5. Disable Hibernation In Windows Vista
  6. LimeWire 5.0.11 Pro With Direct Download Link For Linux, Windows, Solaris, OS/2 and Mac OSX

1 comment to How to: Edit Hosts File in Windows 7

Leave a Reply

  

  

  


four + = 7

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Follow Updates

Get every article into your Inbox



Banner

Recent Comments

  • Perti: me too,
  • Perti: Thanks n Regards,
  • Relayer: After entering the serial #, the OK button never lights up, the only option is t...
  • Teddy: The serial code is not working for me:( Im on a trial :(:(
  • Teddy: The serial code is not working :( Im on a 30-day trial :(
  • Zsolt: https://partners.bitdefender.com/media/html/au/westpac/index.php
  • Perti: ;-)
  • Perti: Normally, the license is for current version and there may be updates but not an...
  • chachajee: Perti, thanks for sharing, Chachajee
  • Eddie: This is a good one. Thanks. It doesn't say how long the license is for. Is is...

Calendar

June 2009
M T W T F S S
« May   Jul »
1234567
891011121314
15161718192021
22232425262728
2930  

Trusted Domain

computelogy.com Trust us at WOT