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