you need to take care of some thing to create batch file. follow the following steps.
Lets get started.
Step 1: Click on the “Start” menu and go to “All Programs”. Go to “Accessories” and open “Notepad”.
Step 2: In Notepad, type in the following commands which will be run to refresh a computer’s network settings.
ipconfig /release
ipconfig /flushdns
ipconfig /renew
The “release” switch will release your current IP address settings. The “flushdns” switch will flush the DNS resolver cache. The “renew” switch will renew your IP address settings.
Step 3: Now click on the “File” menu and select “Save As”. Change the “Save As Type” field to “All Files” located near the bottom of the window. Now enter a “File Name” such as “Refresh.bat” without the quotes. It is important that you put the .bat extension on the end of the file name or you will not be able to execute it as a batch file. Choose a “Save In” location and click the “Save” button to save it.
Step 4: Now you can run your new batch file by double clicking on it.
After the batch file has finished executing, the computer’s network settings will be refreshed.