最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

用bat文件修改Windows的host文件

业界 admin 10浏览 0评论

a.bat

::取消host的只读属性
attrib -R C:\WINDOWS\system32\drivers\etc\hosts 
::用127.0.0.1 a.xxx 代替原来的host文件
@echo 127.0.0.1 a.xxx >C:\WINDOWS\system32\drivers\etc\hosts
::刷新
ipconfig /flushdns

a.bat

::取消host的只读属性
attrib -R C:\WINDOWS\system32\drivers\etc\hosts 
::用127.0.0.1 a.xxx 代替原来的host文件
@echo 127.0.0.1 a.xxx >C:\WINDOWS\system32\drivers\etc\hosts
::刷新
ipconfig /flushdns

发布评论

评论列表 (0)

  1. 暂无评论