Do not know the hosts file what ghost Friends can search on the Internet (Daniel do not spray-)
When visiting the URL, first query the local HOSTS file, then if we change the URL in the Hosts file with the IP map, the wrong IP will be accessed.
Append at end of file:127.0.0.1 www.baidu.com
Normal situation does not have administrator above permissions, is unable to modify the Hosts file (process injection, create services, tamper with the registry, directly take the system permissions, to ignore)
Method 1: In the user group, the current system user is referred to as Administrator right
Method 2: Copy the original Hosts file, modify and paste it back
In the case of write bat file implementation, if you do not have the administrator above permissions, then directly modify the Hosts file failed. We can run implementation modifications as an administrator.
The problem comes again, anti-virus software tip: The Hosts file was modified.
Rescue: Write BAT file copy with copy command, echo command append
No prompt! No prompt! No prompt!
Then, when writing other scripts, the script runs the bat file ...
Small interest: Modify the Hosts file to prohibit access to the specified Web page