Page 1 of 1 1
Topic Options
#207742 - 2013-09-16 02:04 PM @ADDRESS0 etc
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
We have the macros @ipaddress0, @ipaddress1, @ipaddress2 and @ipaddress3
Can we have the equivalent @address0, @address1 etc. which returns the MAC address of the appropriate network adaptor.
I am finding that a Windows 7 Enterprise laptop that has a wireless adaptor, a blank string is returned with @address when the laptop is using the Ethernet network adaptor.
If it uses Wireless then @address returns the MAC address of the wireless adaptor as it is supposed to.

Thanks.
_________________________
Bill

Top
#207745 - 2013-09-16 03:14 PM Re: @ADDRESS0 etc [Re: BillBarnard]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
You can use a number of UDFs that can determine the information you are looking for. One that I worked on a few years ago will do this...

EnumNetworkConnections()
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=139601#Post139601

How to use UDFs -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=81943#Post81943

The rest of the UDFs are here -
http://www.kixtart.org/forums/ubbthreads.php?ubb=postlist&Board=7&page=1


Untested, but should give you an idea...
 Code:
for each $connection in EnumNetworkConnections(1)
  ? "The MAC address for " + split($connection,",")[0] + " is: "  + split($connection,",")[1]
next

Top
#207746 - 2013-09-16 03:28 PM Re: @ADDRESS0 etc [Re: Allen]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
Here is another example which also uses GetIPOptions()
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=159170#Post159170

 Code:
for each $connection in EnumNetworkConnections(1)
  $ConnectionName=split($connection,",")[0]
  $MAC=split($connection,",")[1]
  $IP=GetIPOptions("IPAddress",,$MAC)
  ? $ConnectionName
  ? "   IP:" + $IP
  ? "  MAC:" + $MAC
  ?
next

Top
#207831 - 2013-09-30 01:50 PM Re: @ADDRESS0 etc [Re: Allen]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
Thanks Allen I'll have a look at these.
All the best,
_________________________
Bill

Top
#208151 - 2013-12-10 02:21 PM Re: @ADDRESS0 etc [Re: BillBarnard]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
Interestingly, using your above code this also returns an empty string, with GetIPOptions, when discovering the MAC address of the Wireless Adaptor. It's not empty when using EnumNetworkConnections.
Example output:-

Connection Name: Wireless Network Connection 2
MACAddress: 00:13:02:CA:6A:B7
Adapter Name: Intel(R) PRO/Wireless 3945ABG Network Connection #2
Mac Address:
Static Address:
DHCP Enabled:
IPaddress/SM:
IPaddress0/SM:
IPaddress1/SM:
IPaddress2/SM:
IPaddress3/SM:
DefaultGW:
DNS Servers:
WINS Servers:
DNSSuffix:
DNS Search Order:
DHCP Server:
DHCP Lease Obtained:

Happy Xmas,
Bill
_________________________
Bill

Top
#208152 - 2013-12-10 03:54 PM Re: @ADDRESS0 etc [Re: BillBarnard]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
that doesn't really make sense as the above code gets the mac-address from the enumnetworkconnections()
_________________________
!

download KiXnet

Top
#208153 - 2013-12-10 04:00 PM Re: @ADDRESS0 etc [Re: BillBarnard]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
I was looking over the following pdf and on page 28 there is a screenshot of the installer. One of the options is WMI Support. I'm guessing you don't have that installed.

http://download.intel.com/support/wireless/wlan/sb/3945abgug.pdf

Top
#208154 - 2013-12-10 04:09 PM Re: @ADDRESS0 etc [Re: Allen]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
Doesn't Windows 7 have WMI built in?
I use many wmic commands on remote systems.
e.g.
wmic /node:%1 computersystem get username, name, model, manufacturer
wmic /node:%1 OS get Name
wmic /node:%1 OS get BuildNumber, Description, Version

Regards,
_________________________
Bill

Top
#208155 - 2013-12-10 04:15 PM Re: @ADDRESS0 etc [Re: BillBarnard]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
Ha.... of course it does. But not all DEVICES have built in WMI support with default windows drivers. I forgot to paste the link for the pdf I was talking about earlier... but it is in the post now... see if that clears it up for you.

Edited by Allen (2013-12-10 04:18 PM)

Top
#208157 - 2013-12-10 04:37 PM Re: @ADDRESS0 etc [Re: BillBarnard]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
Oh I see what you mean, the driver may not have had its WMI components installed.
The drivers for Windows 7 would have been installed from a Dell CAB file, which may or may not have had the WMI bits.
I'll have to get hold of a laptop and look at it.
Cheers all,
_________________________
Bill

Top
#208158 - 2013-12-10 05:12 PM Re: @ADDRESS0 etc [Re: BillBarnard]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
I think you are correct, the WMI wireless components are probably not install.
The only laptop I've had a look at just now was a Dell Latitude E6430.
This has a Dell Wireless 1504 adaptor. I don't see any additional management software installed for it. So I reckon the WMI driver support needs a closer look at in future.
Thanks for your input guys.
Best wishes,
_________________________
Bill

Top
Page 1 of 1 1


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

Who's Online
0 registered and 370 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.072 seconds in which 0.031 seconds were spent on a total of 13 queries. Zlib compression enabled.

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