![]() |
Batch file for ipconfig
Hi,
This may be really easy but i can't get it to work! Anyway, How do I create a batch file to run ipconfig? When i make one it either just loads a command prompt window and then sits there, or it scrolls the text rapidly nonstop?! Any help would be useful Thanks Nathan |
What are you trying to accomplish?
You can create a batch file with ipconfig like this: ipconfig /all > ipconfig.txt What this does once it is run is instead of getting a scrolling dos prompt, you will actually get a txt file in the location of your choice of course with the output of ipconfig. I'm not sure that this is your desired outcome but I hope it helps. |
hmm that's odd
I'm on 98se here at work. I put the following text into a batch file I called test ipconfig/release 1 ipconfig/renew 1 (since we have a dial up adapter in there as well, 1 is adapter number of the NIC - for some reason the _all doesn't seem to work on 98) the batch file executed without a hitch and released and renewed an ip no problem. what OS are you on, and what's your batch file look like |
I am on both win2k or winxp.
I thanks for the reply about sending the result to a text file. I hadn't thought of that. I simply want to use the ipconfig /all command to display my network settings in a "DOS" window. I want to have a batch file to do this because I change IP settings often in the process of testing things and I don't want to have to go Run then CMD then type in ipconfig /all. I want something I can put on my quick launch bar and click only once to display the results in a window. Thanks Nathan |
cut and paste this to your batch file. Works without a hitch, and nothing shows up but your ip configuration.
@echo off ipconfig/all pause Later |
I am afraid that all that does is open up a window and then print ipconfig /all many many many many times!!
sorry! |
gotta be something in your config
Quote:
|
Quote:
|
When I type pause at the command prompt it then says:
please press any key to continue...... Thanks for the help |
Another thought:
Surely typing @echo off Means that whatever comes up on the screen will not be displayed? |
Quote:
|
Ok my mistake.
I have just tried this on a 2k server box. And, with the echo off command all that happens is the c: etc is not displayed. The results show up fine. Anyhow all the scripts mentioned so far work brilliantly on a 2k machine. Thanks for that. I guess that the question now is, why does this not work on winxp pro? Basically starting any command from a batch file has the effect of opening a dos box and then entering the command many times. Nothing seems to actually get executed. Also when trying some of the scripts posted here it often then opens hundreds of dos boxes which i can't then shut. The computer then runs out of memory and virtual memory!!! Any more ideas? |
Ok, I'm at home now...was @ work earlier, so I have now tested it on both 2K Pro AND XP Pro...no problems at all........not sure what to say. Will see what I can find though.
|
try the following.
cd\ cd \windows\system32 ipconfig /all pause |
Hi,
Thanks for that last post. It works!!. Why does it work?! Is it something to do with putting in the specific path? |
| All times are GMT -5. The time now is 08:12 PM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.