Obtaining the hardware MacAddress ON WINDOWS

Ken Ray kray at sonsothunder.com
Mon May 21 18:16:17 EDT 2007


On Thu, 17 May 2007 13:28:40 -0400, Roger.E.Eller at sealedair.com wrote:

> When you have Parallels or VMware installed on a Windows box, it created
> multiple virtual NICs. Each one has its own MacAddress. I want to determine
> the MacAddress of the REAL hosts NIC? It isn't in the registry, so how can
> this be achieved? I have tried the following, but it returns all 4 NICs,
> and you can't tell which one is real (and active):
> 
> function getWinMacAddress
>   set the hideConsoleWindows to true
>   put "net config rdr" into tShellCommand
>   put shell(tShellCommand) into tNetInfo
>   filter tNetInfo with "*NetBT_Tcpip*" -- last word is MacAddress
>   put word -1 of line 1 of tNetInfo into tMacAddress
>   return tMacAddress
> end getWinMacAddress

How about the tip:

http://www.sonsothunder.com/devres/revolution/tips/env001.htm

Does that work for you?


Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/




More information about the use-livecode mailing list