PDA

View Full Version : Can I add an entry to the Hosts file?



JorgeA
2011-12-14, 22:35
Hi,

I have two questions regarding the hosts file:

1) Can I manually add an entry to it?

2) Will the line that I manually added, disappear the next time Spybot updates the immunizations?

Thanks!

--JorgeA

tashi
2011-12-15, 04:36
Hello JorgeA,


1) Can I manually add an entry to it?

Yes, one explanation: http://forums.spybot.info/showthread.php?t=61701


The large section of entries SpyBot Search & Destroy adds to the hosts file will start with the line at the top

# Start of entries inserted by Spybot - Search & Destroy

and have this line at the bottom.

# End of entries inserted by Spybot - Search & Destroy

Any hosts file lines that the user wants to add should be added below the line

127.0.0.1 localhost

and # Start line listed above.


2) Will the line that I manually added, disappear the next time Spybot updates the immunizations?

From the same thread,
It is imperative to keep any lines that you add outside the ones that SpyBot S&D's immunizations adds, so that they aren't removed during re-immunization.
Put them between the LocalHost line and the # Start line.

Hope that helps. :)

JorgeA
2011-12-19, 22:19
tashi,

Thank you very much for the reply -- you've provided all the information that I was looking for!

:thanks:

--JorgeA

tashi
2011-12-20, 00:59
Cheers. :)

JorgeA
2011-12-20, 03:10
tashi (or anybody else who can answer this),

OK, so I went to modify the Hosts file to add a couple of lines. I tried to do this in Notepad. When I went to save the file, I got a pop-up box that said, "Cannot create the C:\Windows\System32\drivers\etc\hosts file. Make sure that the path and file name are correct."

Huh? I was in the right place, at least I seemed to be. Maybe there is write protection on the hosts file?

Even more confusingly, when I went to close Notepad, it actually gave me a new box asking if I wanted to save the changes that, just before, I had been prohibited from saving. :confused:

I think I'll leave this alone for the time being.

What do you think?

--JorgeA

P.S. I tried the approach offered by Microsoft here (http://support.microsoft.com/kb/923947), but it didn't help -- I still got the same error message.

JorgeA
2011-12-20, 03:35
I took too long to find the solution, so I had to write it in a separate post:

The key is that you need to go into the Hosts file's Properties, and uncheck the "Read-only" attribute. Having done that, you can then open Notepad (still as an administrator), make the changes, and finally get to save them.

At the end, don't forget to change the hosts file's attribute back to "read-only."

Hope this helps somebody trying to do the same thing.

--JorgeA