Here's another version.. the MAC address stuff is a bit of a cop-out, but it shows you the relevant info:
IP Address : 10.25.25.1
=-_-=-_-=-_-=-_-=-_-=-_-=
Ethernet adapter Wireless Network Connection:
Ethernet adapter Local Area Connection:
Physical Address : 00-18-DE-C0-FE-21 ß This refers to the Wireless Connection
Physical Address : 00-16-D4-A1-30-60 ß This refers to the Local Area Connection
Message will disappear in 30 seconds
---
:: Start ip-mac.cmd
@echo off
setlocal
cls
:: Temporary file data file containing the information used in this file
SET IMTF=IP_MAC_TEMP_FILE
:: Get the current IP address
ipconfig | find /i "ADDRESS" > %IMTF%
for /f "tokens=1-6 delims=,:. " %%i in (%IMTF%) do (
CALL :SHOW-IP %%i %%j %%k %%l %%m %%n
)
echo =-_-=-_-=-_-=-_-=-_-=-_-=
:: Show the order of the MAC Addresses
:: (Used for multiple adapters)
ipconfig /all | find /i "ethernet adapter"
:: Get MAC Address (for all adapters)
ipconfig /all | find /i "Physical Address" > %IMTF%
for /f "tokens=1-6 delims=,:. " %%o in (%IMTF%) do (
call :SHOW-MAC %%o %%p %%q
)
:: Finish the prog
goto :FINI
:SHOW-IP
echo %1 %2 : %3.%4.%5.%6
goto :EOF
:SHOW-MAC
echo %1 %2 : %3
goto :EOF
:FINI
echo.
:: Clear the Temp file used in this prog
:: (Uncomment the next line to troubleshoot)
echo. > %IMTF%
echo Message will disappear in 30 seconds
ping -n 30 127.0.0.1 > nul
endlocal
:: End ip-mac.cmd
Kind regards,
Derek Byrne
IT Retail Field Engineer
E:
derek.byrne@... <mailto:
derek.byrne@...>
P: 01 - 430 7398
M: 085-711 7398
Disclaimer: The contents of this message and any attachments to it are confidential and may be legally privileged. If you have received this message in error you should delete it from your system immediately and advise the sender. To any recipient of this message within Meteor, unless otherwise stated you should consider this message and attachments as "METEOR CONFIDENTIAL".
--------------------------------------------------------------------------------
From:
batchworld@... [mailto:
batchworld@...] On Behalf Of foxidrive
Sent: 11 September 2007 07:59
To:
batchworld@...
Subject: Re: [BATCH WORLD] Easy IP
On Tue, 11 Sep 2007 08:40:31 +0200, srivastava <
knsri@... <mailto:knsri%40alum.com> > wrote:
>The following I found at
>
http://www.softwaretipsandtricks.com/windowsxp/articles/320/1/Easy-IP.
>
>What does this do? Before I apply on my computer, I would like to know
>what benefits it would cause to me.
>
>
>Copy this code into notepad and save it in the windows directory
>folder as ip.bat.
>
>@echo.
>@echo IP INFORMATION
>@echo By: WindowsXPAtoZ.com
>
>@ipconfig/all | find "IP Address"
>@ipconfig/all | find "Subnet Mask"
>@ipconfig/all | find "Default Gateway"
>@ipconfig/all | find "Host Name"
>@ipconfig/all | find "DNS Suffix Search List"
>@ipconfig/all | find "Physical Address"
>@ipconfig/all | find "DHCP Enabled"
>@ipconfig/all | find "DHCP Server"
>@ping 127.0.0.1
>@echo.
>@pause
>
>To run Goto Start>Run and type ip
>
>Thanx
>Kailash
It cannot harm your PC in any way. It displays the information about your
network connection - type this at a command prompt and look at the screen
output.
ipconfig /all
ping 127.0.0.1 simply pings your own PC and delays the script for around 4
seconds.
******************************************
Meteor Mobile Communications Limited, trading as Meteor.
Registered Office: 4030 Kingswood Avenue, Citywest Business Park, Naas Road, Dublin 24, Ireland.
Registered in Ireland: 282645
DISCLAIMER: This email and its attachments contain confidential information and may be legally privileged. The message is intended only for the addressee(s) stated above. If you are not the named addressee(s) or intended recipient please do not use, copy, disseminate or disclose the information to anyone. If you have received this email in error please immediately notify the sender at Meteor and delete the material from any system and destroy any copies.
******************************************
[Non-text portions of this message have been removed]