Computing.Net > Forums > Programming > Batch - using ipconfig

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch - using ipconfig

Reply to Message Icon

Name: spoonman184
Date: October 17, 2008 at 03:32:14 Pacific
OS: Windows Vista
CPU/Ram: AMD X2 4400+ 2 GB DD
Product: ACER M3100
Comment:

I am trying to create a batch file that will display my ipconfig, and then pause.
I have:

@echo off
ipconfig
pause</code>

This seems not to do anything. So then I tried this:

ipconfig > ipconfig.txt
pause


This is what I receive on the command line, without a new text file.

C:\Documents and Settings\User\Desktop>ipconfig 1>ipconfig.txt


Any pointers would be appreciated.

crappy OEM comptuers...



Sponsored Link
Ads by Google

Response Number 1
Name: toast (by NoIdea)
Date: October 17, 2008 at 04:25:27 Pacific
Reply:

I do not know if your version of Vista has the netsh interface
Could try

netsh diag show ip

so if that works

netsh diag show ip >ip.txt

Might need to give it a kick

@echo off
cls
@ipconfig /release *CON*
@ipconfig /flushdns
@ipconfig /renew
@ipconfig /registerdns
@ipconfig /all
pause
exit


0

Response Number 2
Name: spoonman184
Date: October 17, 2008 at 04:28:59 Pacific
Reply:

Using Win XP SP2

crappy OEM comptuers...


0

Response Number 3
Name: toast (by NoIdea)
Date: October 17, 2008 at 04:31:16 Pacific
Reply:

pro or home?


0

Response Number 4
Name: spoonman184
Date: October 17, 2008 at 04:34:42 Pacific
Reply:

Professional

crappy OEM comptuers...


0

Response Number 5
Name: spoonman184
Date: October 17, 2008 at 04:46:19 Pacific
Reply:

Also, cannot run the batch file from a command line. Same result.

crappy OEM comptuers...


0

Related Posts

See More



Response Number 6
Name: toast (by NoIdea)
Date: October 17, 2008 at 06:37:31 Pacific
Reply:

Have you tried netsh?

netsh diag gui (will need help and support service enabled).
Is this computer you are using the one you want the ip address of?
Dhcp service running?
ping "Your computers name"


0

Response Number 7
Name: spoonman184
Date: October 17, 2008 at 06:40:29 Pacific
Reply:

Netsh is a go. The computer I am using is the one I want the information of. Not just the IP, but the gateway as well. I am using a static IP address. A ping should work... didn't test it. Do you want me to ping my internal lan or 127.0.0.1?

crappy OEM comptuers...


0

Response Number 8
Name: jon_k
Date: October 17, 2008 at 08:51:23 Pacific
Reply:

odd...

My XP Pro SP3 works fine with

@echo off
ipconfig
pause

You could try

@echo off
c:
cd \windows\system32
ipconfig
pause

But what you've got should work, shouldn't it?


0

Response Number 9
Name: spoonman184
Date: October 17, 2008 at 09:12:09 Pacific
Reply:

lol. You were right - just needed to change directories.

crappy OEM comptuers...


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch - using ipconfig

ipconfig batch file www.computing.net/answers/programming/ipconfig-batch-file/18805.html

DOS batch help (ipconfig | find) www.computing.net/answers/programming/dos-batch-help-ipconfig-find/13892.html

Creating a batch using a batch www.computing.net/answers/programming/creating-a-batch-using-a-batch/15721.html