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
| 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
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.