DOS下禁止修改hosts文件

手动:
打开 %Systemroot%\system32\drivers\etc\ ,打开“hosts”的“属性”,将其修改为“只读”,然后保存

DOS命令:

禁止修改HOSTS文件:
echo y|cacls %windir%\system32\drivers\etc\hosts /g everyone:r

允许修改HOSTS文件:
echo y|cacls %windir%\system32\drivers\etc\hosts /g everyone:f

将上面的代码,在运行里面输入即可。

This entry was posted in Technology and tagged , . Bookmark the permalink. 4,869 views

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *