1

I wish to add and remove some lines in host file within a period of time (Time setting will be done via task schedule job)

I can create two BAT file, one for adding new lines and one for removing existing lines.

After some research in Google, i could only find something related to ADD new lines, but not remove it. (replace) and mostly were subject to one line. As i had a huge chunk of lines need to insert and remove.

Any ideas or suggestion? (not sure will it be better to replace the HOST file physically.)

some findings related.

Is it possible to automatically run a batch file as administrator https://stackoverflow.com/questions/3666740/windows-batch-how-to-add-host-entries https://stackoverflow.com/questions/16208429/how-to-replace-a-string-in-the-host-file-using-batch http://www.dslreports.com/forum/r26962139-Other-Adding-entries-to-HOSTS-file-by-batch-script

2

0

You must log in to answer this question.

Browse other questions tagged .