@ECHO OFF&CD /D %~DP0
::命令行参数:
::/A : 添加域名（可用IP:0.0.0.0, 127.0.0.1, ::, ::1 ) 
::/D : 删除域名( /4: 仅IPv4, /6: 仅IPv6 )
::/B : 备份现有hosts文件
::/R : 还原原有hosts文件
::/SR :设置hosts文件只读
::/SW :设置hosts文件可写
::一行命令直接添加三个域名
hostsedit.exe /A www.example.com example.com www.example-2.com
::hostsedit.exe /A www.example.com example.com www.example-2.com 127.0.0.1
::hostsedit.exe /A www.example.com example.com www.example-2.com ::i 127.0.0.1
::hostsedit.exe /A www.example.com example.com www.example-2.com 127.0.0.1 #Example Comment
::hostsedit.exe /D www.example.com example.com www.example-2.com
::hostsedit.exe /D /4 www.example.com example.com www.example-2.com
::hostsedit.exe /D /6 www.example.com example.com www.example-2.com
::hostsedit.exe /help
EXIT