Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Hosts file editing: save problem


11 Dec 2011   #1

Home Premium 64 bit
 
 
Hosts file editing: save problem

My Hosts file was lost so I downloaded a new one. This I edited to block two sites that had intruded and given trouble. I saved initially to desktop and then tried to paste and save it in to C:\windows\.......\etc , but failed to do so as error as per att, appeared,

I am a sole user/ administrator, and also have opened run Notepad as administrator to no avail.

What am I doing wrong?




Attached Images
 
My System SpecsSystem Spec
.

11 Dec 2011   #2

Windows 8 Core X64
 
 

Open an Elevated Command prompt and do the following:

cd \windows\system32\drivers\etc
attrib -h -s -r hosts

Copy the new hosts file to this directory

attrib +r +h +s hosts

exit

That should do it.
My System SpecsSystem Spec
12 Dec 2011   #3

Home Premium 64 bit
 
 

Thanks! It worked, but I wish I understood the commands.
My System SpecsSystem Spec
.


13 Dec 2011   #4

Windows 8 Core X64
 
 

This one changes the current directory (the one you are in) to \windows\system32\drivers\etc. That's where the hosts file is located.

cd \windows\system32\drivers\etc

This one clears the Hidden (h), System (s) and Read Only (r) attributes, making the file visible and changeable.

attrib -h -s -r hosts

This one turn on the Hidden (h), System (s) and Read Only (r) attributes again to protect the hosts file from being easily modified.

attrib +r +h +s hosts
My System SpecsSystem Spec
Reply

 Hosts file editing: save problem




Thread Tools



Similar help and support threads for2: Hosts file editing: save problem
Thread Forum
editing hosts file General Discussion
problem hosts file Network & Sharing
HOSTS File - Create a "Edit HOSTS file" Shortcut Tutorials
Hosts File Editing Network & Sharing
BSOD after editing hosts file and running warcraft 3? BSOD Help and Support
Solved New file name save problem General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 07:33 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33