what if the line is already there? do you still want it to put the new line
in there?
one way would be:
echo "10.10.10.10
somehost.network.com">>%systemroot%\system32\drivers\etc\hosts *
* noteAssuming the path to hosts is correct on EVERY machine.....
because the >> tells it to append to the end of the file.
Checking for the presense of the line would go like this (syntax not
accurate)
if (hosts | find /c /i "10.10.10.10") = 0 then
echo "10.10.10.10 somehost.network.com"
else
next
or something....
I can show you how to do it with perl, but you probably want it done in
batch. Cant really help with that.
NuTs