|
Answer» Hi GUYS,
Im new here and to batch FILES, i was trying to write an easy batch file that would flush my pc's DNS. The way i do it now would be to go to the command window and type ipconfig /dns. Im not SURE if this is correct but this is what im thinking. Please correct me where i know im wrong
echo off echo This will Flush your DNS pause c:\windows\system32\cmd.exe type ipconfig /dns
echo on
Thanksyou don't need to start cmd, it starts automatically for a batch you only need one line:
Code: [Select]type ipconfig /dns in a Batch file. or to get the effect you SEEM to be going for:
Code: [Select]Echo off echo this will flush your DNS pause ipconfig /dns I've got a batch file I use just for this. (we had issues a while back and the DNS needed to be flushed)
I don't have it with me, but it was something along the lines of.....
Code: [Select]echo off cls echo. echo. echo. Pressing a KEY will flush your DNS echo. echo. echo. pause>nul ipconfig /flushdns
ping localhost>nul
ipconfig /registerdns
echo. echo. echo. DNS is now flushed. Please see above for any errors echo. echo. echo. pause exit
hope it helps.thanks for the info, im a noob and have allot to learn. Where do you reccommend that I start? I have done a bunch of google searches and found some dos command pages but im not sure how to use them. Thanks
|