-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
对Windows脚本cfst_hosts.bat的修改建议 #508
Comments
那这样的话,你要如何同步 |
不是哦, |
如果只是一开始将系统 hosts 复制出来一次,后续都只是修改旁边的 hosts 并复制到系统 hosts 覆盖,我知道你想的是即使某次覆盖出现问题,旁边 hosts 里的 IP 和 但这样的话,如果你要更改系统 hosts,那么就需要手动同步到旁边 hosts 的内容,否则等下次运行脚本替换 IP 覆盖系统 hosts 的时候,系统 hosts 里你修改的内容都会被重置为旁边 hosts 的内容了。 所以你用一个更大更麻烦的问题来解决一个小问题。。。
|
功能需求
多次发现Windows脚本经过一段时间的自动运行后,系统hosts与nowip_hosts.txt不同步了,导致后续无法继续自动替换IP,猜测是某次脚本中断或者获取管理员权限出现问题。
建议先修改cfst_hosts.bat同目录下的hosts文件,然后对系统hosts进行覆盖,这样的好处是修改同目录下hosts不需要管理员权限,不太会出现问题,如果某次覆盖系统hosts失败,下次运行脚本后仍能正确修改系统hosts。
当然这么做会影响其他hosts条目,可以将系统hosts复制出来再做修改,如果有其他动态hosts需求,那这个方法就不适用了。
预期目标
The text was updated successfully, but these errors were encountered: