ClioSport.net

Register a free account today to become a member!
Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • When you purchase through links on our site, we may earn an affiliate commission. Read more here.

Can't edit Host file



  "Navy" N17 TWO
Trying to edit my Host file tonight
When I go to save it, it won't let me :mad:

Error box comes up and says;

"Cannot create the C:Windows\System32\Drivers\etc\hostsfile.
Make sure the path and file name are correct"

I'm running Vista Home premium - 32bit

Help!

Thanks
Trev
 
  Fiesta ST
Need to edit it in administrator mode.

Run notepad as "run as administrator" then file open and browse for the host file.
 
  "Navy" N17 TWO
Already tried that mate :(

Oh - how the hell do you stop that security warning when you run/install programs?

"Windows needs your permission to continue" - can be a right ballache sometimes! :eek:
 
  Clio 182
It should work if you are running as an administator. Try running notepad and draging the host file into the open notepad window.

for your other problem y ou need to turn down the UAC controls you can do that by going into the control panel and look under user accounts for "User account control" and either turn it off or slide it down to be less annoying.
 
  Bus w**ker
Copy and paste the hosts file to the desktop from its dir in System32, edit as admin with notepad and then cut and paste back to System32 overwriting the original. Only way I could edit mine and I've ripped Vista to bits to get rid of all the security s**te, it's near enough XP lol.
 

Cookie

ClioSport Club Member
Mate, easiest way

Create a shortcut on your desktop pointing to this notepad.exe C:\Windows\System32\drivers\etc\hosts
 
  "Navy" N17 TWO
The file name was right lol - I'll try copying it to the desktop now

I am the administrator (only user on the laptop) but every time I go to do anything like this I get that bloody permission box up :S
 
  185lb/ft dCi
unfortunately with windows, you are never the true administrator, have you tried going into safe mode and editing it there?
 
  "Navy" N17 TWO
Nope,

Tried doing it the shortcut way too just now - still get that error when I attempt to save it
 
  Cupra
Take ownership of the file first? With Vista there are some files that you have to take ownership of before you are able to change them. IIRC
 
If its UAC causing the problem you can quickly turn it off to check.

Click Start button then the pic on top right of the menu.

Click on Change User Account Control settings and turn it off.
 

Cookie

ClioSport Club Member
It's not UAC that's causing the issue, it's Vista's higher security level compared to XP

It's a good thing tbh, means your host file doesn't get hijacked by malware
 
  Cupra
The whole procedure:

"The HOSTS file is in the same place that it's always been in Windows:
\windows\system32\drivers\etc. But that directory has a different set
of NTFS permissions than Windows has ever seen, as by default
administrators can't delete files, nor do they own those files. You can
give yourself enough control of HOSTS to modify it by first taking
ownership of it, then granting yourself full control to HOSTS. That's
most easily done from an elevated command prompt.

"(Note: an "elevated command prompt" means that you right-click the
Command Prompt icon
and choose "Run as administrator," and then click
"Confirm" when you get the User Account Control prompt.)

"From the elevated command prompt, type these two lines:

takeown /f c:\windows\system32\drivers\etc\hosts
icacls c:\windows\system32\drivers\etc\hosts /grant yourusername:f

"Those are two new Vista command-line tools. The first lets you take
ownership of a file or folder, as its name suggests. That line that you
typed is the simplest form of takeown: just add a "/f" and the name of
the file or folder to take ownership of. (Takeown even lets you take
ownership of things on remote systems, which can be convenient.) The
second command lets you adjust NTFS permissions and file/folder
integrity levels -- it's intended to be the replacement for cacls, which
has been around since NT 3.1, and its syntax closely mirrors cacls's.
In that command, I'm using the /grant option to allow me to give the
account "yourusername" full control; that's what the "F" stands for."

Hope that helps,
 


Top