|
|
|||||||
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. |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
Thanks Allen I'll have a look at these. All the best, |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
that doesn't really make sense as the above code gets the mac-address from the enumnetworkconnections() |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
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, |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
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, |
||||||||
|
|
|||||||
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, |