Articles

Batch - using ipconfig

ACER M3100
October 17, 2008 at 03:32:14
Specs: Windows Vista, AMD X2 4400+ 2 GB DD

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...


See More: Batch - using ipconfig

Report •


#1
October 17, 2008 at 04:25:27

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


Report •

#2
October 17, 2008 at 04:28:59

Using Win XP SP2

crappy OEM comptuers...


Report •

#3
October 17, 2008 at 04:31:16

pro or home?

Report •

Related Solutions

#4
October 17, 2008 at 04:34:42

Professional

crappy OEM comptuers...


Report •

#5
October 17, 2008 at 04:46:19

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

crappy OEM comptuers...


Report •

#6
October 17, 2008 at 06:37:31

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"


Report •

#7
October 17, 2008 at 06:40:29

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...


Report •

#8
October 17, 2008 at 08:51:23

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?


Report •

#9
October 17, 2008 at 09:12:09

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

crappy OEM comptuers...


Report •


Ask Question