How to modify the Hosts of Windows 7 system to obtain administrator rights

  

Simply say Windows
7
Hosts in the system are recording the IP corresponding to some domain names, because Windows7 strengthens system permissions , so when you modify the file, you will be prompted: "You do not have permission to save the file in this location, please contact the administrator to get the corresponding permission" error message.

To solve this problem is very simple

1, find the Hosts file “ Windows7 system Hosts file path is: C:\\WINDOWS\\system32\\drivers\\etc\\hosts”.



2, open Hosts with Notepad, modify the contents, and save.


3. Save the modified Hosts file and close it.


This method can also be used to solve the prompt without permission to modify the Hosts file.

4, copy the following code to the txt file, and save as "lds;hosts.bat"; here, note that if some friends computer
does not display the file suffix, This direct naming is not effective, you want to display the suffix of the common file in the folder options.



@echo off

del %systemroot%\\system32\\drivers\\etc\\hosts

echo 127.0.0.1 www .test.com>>%systemroot%\\system32\\drivers\\etc\\hosts

start http://www.test.com

5, right click ”hosts.bat” File, choose to run with administrator privileges. Just fine.



Copyright © Windows knowledge All Rights Reserved