Page 1 of 1 1
Topic Options
#29533 - 2002-09-24 12:44 AM @Address
Broken Arrow Offline
Fresh Scripter

Registered: 2002-09-24
Posts: 8
Loc: US
Hi, everyone, this is my first post. [Smile] I'd like to thanks everyone in this forum, I have learned a lot from all your posts. Here is my question, why does @address and @IPaddress0 sometimes return a wrong value? [Confused] Is there another way to get the Mac Address from the machine that does not fail?
Again, thanks to everyone.

Top
#29534 - 2002-09-24 12:46 AM Re: @Address
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
What OS? What is output? Do you have multiple network cards, a virtual network card, or dialup netwroking installed?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#29535 - 2002-09-24 12:47 AM Re: @Address
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
How do you know that it is a wrong value?
_________________________
There are two types of vessels, submarines and targets.

Top
#29536 - 2002-09-24 12:57 AM Re: @Address
Broken Arrow Offline
Fresh Scripter

Registered: 2002-09-24
Posts: 8
Loc: US
Thanks for your super fast respond. I have 95, NT, 2000 workstations. Single Nics in almost all cases, no virtual network in place or RAS connections. Sometimes I get a blank string from @address. In other cases I get IPs 1.0.0.1 when my network is a 172.27.x.x.
Take a look at this:

Ethernet adapter ZZPGPMacMP2:
Description . . . . . . . . : RTL8139(A) Based NDIS 5.0 driver

Physical Address. . . . . . : 00-10-B5-41-D6-34

DHCP Enabled. . . . . . . . : Yes

IP Address. . . . . . . . . : 172.27.21.213

Subnet Mask . . . . . . . . : 255.255.252.0

Default Gateway . . . . . . : 172.27.20.10

DHCP Server . . . . . . . . : 172.27.20.102

Primary WINS Server . . . . : 172.27.xx.xx

Secondary WINS Server . . . : 172.27.86.101

Lease Obtained. . . . . . . : Monday, September 23, 2002 6:29:47 PM

Lease Expires . . . . . . . : Tuesday, October 08, 2002 6:29:47 PM

Ethernet adapter ZZZPGPCfg3:
Description . . . . . . . . : PGPnet Virtual Identity Adapter

Physical Address. . . . . . : FF-FF-FF-00-00-00

DHCP Enabled. . . . . . . . : Yes

IP Address. . . . . . . . . : 0.0.0.0

Subnet Mask . . . . . . . . : 0.0.0.0

Default Gateway . . . . . . :

DHCP Server . . . . . . . . : 255.255.255.255

Why isn't @address getting the MAC from the active connection?

Top
#29537 - 2002-09-24 01:02 AM Re: @Address
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Based on what you show in your last post, you do have two adapters. So, most likely @ADDRESS0 returns the values for adapter 'PGPnet Virtual Identity Adapter'. You should check @ADDRESS1 to it's value. I would not be surprised if it returns the value for 'RTL8139(A) Based NDIS 5.0 driver'
_________________________
There are two types of vessels, submarines and targets.

Top
#29538 - 2002-09-24 01:08 AM Re: @Address
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Check your binding order on a computer that reports correctly and one that reports what you think is incorrectly. Change the binding order of the adapters and restart the computer. Is the data more to your liking?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#29539 - 2002-09-24 03:40 AM Re: @Address
Broken Arrow Offline
Fresh Scripter

Registered: 2002-09-24
Posts: 8
Loc: US
I'll give it a try, thank you all.
Top
#29540 - 2002-09-24 09:41 AM Re: @Address
Waltz Offline
Seasoned Scripter

Registered: 2002-08-01
Posts: 485
Loc: Waterloo, Ontario, Canada
Have a look at the Breaker's code for a WMI query to get NIC / MAC / IP / DHCP info...

http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=1;t=005814#

[ 24. September 2002, 09:44: Message edited by: Waltz ]
_________________________
We all live in a Yellow Subroutine...

Top
#29541 - 2002-09-24 02:37 PM Re: @Address
Broken Arrow Offline
Fresh Scripter

Registered: 2002-09-24
Posts: 8
Loc: US
Sealeopard, you are completly right. Now why is that? If it saw the mac for the second card, why didn't it see the ip for that card?
Top
#29542 - 2002-09-24 02:40 PM Re: @Address
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Did you check your binding order yet?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#29543 - 2002-09-24 03:00 PM Re: @Address
Broken Arrow Offline
Fresh Scripter

Registered: 2002-09-24
Posts: 8
Loc: US
I haven't. The guy who has the PC is out of town until tomorrow, and left his office under lock. I'l take a look at it tomorrow, whe he arrives.
Thanks
One more thing, from what I'm reading I have a little more to learn regarding this two macros. Could give me a little help on this. I still don't understand why if @address is returning the mac from the second card, @ipaddress0 is returning the ip for the first card.

Top
#29544 - 2002-09-24 03:03 PM Re: @Address
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I find that interesting as well. By providing complete information about the computer including the binding order and another "ipconfig /all", we may be able to piece together what is happening. If we can't and we have sufficient information, we could forward the question to Ruud.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#29545 - 2002-09-24 03:29 PM Re: @Address
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
I would also say it's the binding order. Thus, KiXtart is actually returning correct results (IPADDRESS0 for adapter 0 which is not necessarily the NIC), just not in the order the user expects.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1607 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.127 seconds in which 0.078 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org