Hosts File in Win 7
I tried to edit the 'hosts' file in 'system32\drivers\etc\' folder, but windows says :This file is set to read-only. How can I edit and save the 'hosts'-file?
June 2nd, 2012 2:04am

As the file is Read-only, right-click it, click Properties and remove the check mark. Make a backup copy of it, then using Notepad change its contents and save it (not as a .txt file, i.e. it has no extension). If you are unable to access the file, browse the Windows folder, right-click notepad.exe and choose Run as Administrator, then open Hosts.
Free Windows Admin Tool Kit Click here and download it now
June 2nd, 2012 3:17am

 Hi, Firstly, please make sure that the hosts file is able to be changed. For detail steps: 1. Right click on hosts file and click Properties. 2. Uncheck the option Read-only In addition, if you have turned on the UAC, an permission error should be received. Windows uses split security tokens when you are logged on with the Administrator account and have UAC on. This means that normal actions will use a standard user token, and only actions that are explicitly marked as needing admin rights will use an Admin token. So, when you open a file in Notepad.exe, it will use the standard user token. The problem is, the Windows directory is protected from writes unless you have appropriate privileges, and a standard user does not. However, this is easy to work around: 1. Type Notepad.exe in the search box, so that it appears in the program list (or browse to it) 2. Right-click Notepad.exe and choose Run as Administrator 3. Now browse to the HOSTS file and open it in the elevated Notepad instance. Now it should save fine. 1. Type Notepad.exe in the search box, so that it appears in the program list (or browse to it) 2. Right-click Notepad.exe and choose Run as Administrator 3. Now browse to the HOSTS file and open it in the elevated Notepad instance. Now it should save fine. For more reference, You cannot modify the Hosts file or the Lmhosts file in Windows Vista and Windows 7 http://support.microsoft.com/kb/923947 Hope this helps Vincent Wang TechNet Community Support
June 2nd, 2012 5:18am

Open an administrative command prompt (right-click and select "Run as Administrator"). Navigate to \Windows\system32\drivers\etc. Type: Notepad hosts. Since Notepad was invoked via the administrative command prompt, Notepad will run under the local Administrative token allowing you to edit the hosts file as necessary.
Free Windows Admin Tool Kit Click here and download it now
June 2nd, 2012 9:46pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics