![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-11-11 08:22 |
47,815 topics / 349,930 posts / today 0 new / 48,291 members |
| DOS批处理 & 脚本技术(批处理室) » Search for the HOSTS file and insert lines |
| Printable Version 4,353 / 16 |
| Floor16 bailang3106 | Posted 2008-09-24 14:05 |
| 初级用户 Posts 19 Credits 36 | |
|
I also put a reference up.. Because the configuration system made one
@echo off setlocal enabledelayedexpansion echo Y|cacls %windir%\system32\drivers\etc\hosts /g everyone:f attrib -r -a -s -h %windir%\system32\drivers\etc\hosts color 0A echo.>> %windir%\system32\drivers\etc\hosts FOR /F "eol=# tokens=1 delims=" %%i in (LIST.txt) do ( FIND "%%i" %windir%\system32\drivers\etc\hosts IF errorlevel 1 @echo %%i >> %windir%\system32\drivers\etc\hosts ) @echo on @echo Press any key to exit the installation program @echo. & pause 1>nul 2>nul |
|
| Floor17 bailang3106 | Posted 2008-09-24 14:05 |
| 初级用户 Posts 19 Credits 36 | |
|
Template for list.txt:
10.96.100.55 mismidt01.pec.com.cn 10.96.100.56 mismidt02.pec.com.cn 10.96.100.57 mismidt03.pec.com.cn |
|
| Prev 1 2 |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |