G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

I have a script which allows you to enter a hostname and it would return the
MAC address of that computer. How do I modify it so that I could enter a
MACAddress and have it return the hostname or logon username? Appreciate any
help, thanks.

strComputerName = InputBox("Enter the name of the computer you wish to query")
strWinMgt = "winmgmts://" & strComputerName &""
Set IPConfigSet = GetObject (strWinMgt).ExecQuery("select MACAddress,
DNSHostname from Win32_NetworkAdapterConfiguration")
for each IPConfig in IPConfigSet
WScript.Echo "MACAddress: " & IPConfig.MACAddress
next
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

From: "UWKC Admin" <UWKCAdmin@discussions.microsoft.com>

| I have a script which allows you to enter a hostname and it would return the
| MAC address of that computer. How do I modify it so that I could enter a
| MACAddress and have it return the hostname or logon username? Appreciate any
| help, thanks.
|
| strComputerName = InputBox("Enter the name of the computer you wish to query")
| strWinMgt = "winmgmts://" & strComputerName &""
| Set IPConfigSet = GetObject (strWinMgt).ExecQuery("select MACAddress,
| DNSHostname from Win32_NetworkAdapterConfiguration")
| for each IPConfig in IPConfigSet
| WScript.Echo "MACAddress: " & IPConfig.MACAddress
| next
|

Hereis a good place to start...
microsoft.public.win32.programmer.wmi


--
Dave
http://www.claymania.com/removal-trojan-adware.html
http://www.ik-cs.com/got-a-virus.htm
 

TRENDING THREADS