WMI script

Forum Windows XP : Windows XP General Discussion - WMI script

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

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

Sponsored Links
Register or log in to remove.

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

Reply to Anonymous
Tom's Hardware > Forum > Windows XP > Windows XP General Discussion > WMI script
Go to:

There are 511 identified and unidentified users. To see the list of identified users, Click here.

Please mind

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.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them