Solved

Access remote computer Mac Address with vb.net

Posted on 2011-03-16
4
908 Views
Last Modified: 2012-06-21
Hi there,

I'm writing a little program that can detect remotely a mac address, the nic, the video card and the service tag (dell computer). I'm stuck with the service tag and the mac address.
Anyone there have an idea.

Thanks.
0
Comment
Question by:hamda000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 20

Accepted Solution

by:
hes earned 500 total points
ID: 35147652
For the MAC address have a look here
http://social.msdn.microsoft.com/forums/en-US/Vsexpressvb/thread/bd2403a0-6eab-4c72-951d-1ef74e2bbab1/

Be sure to import the System.Management and System.Management.Instrumentation namespaces

Dim theManagementScope as new ManagementScope("\\" & ComputerName & "\root\cimv2")
Dim theQueryString as new string = "SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = 1"
 
Dim theObjectQuery as new ObjectQuery(theQueryString)
 
Dim theSearcher as new ManagementObjectSearcher(theManagementScope, theObjectQuery)
Dim theResultsCollection as ManagementObjectCollection = theSearcher.Get()
 
for each currentResult as ManagementObject in theResultsCollection
   MessageBox.Show(currentResult("MacAddress").ToString())
next

0
 
LVL 20

Expert Comment

by:hes
ID: 35147764
This is in VBS but it should be easy to convert
http://www.vbforums.com/showthread.php?t=326425
0
 

Author Comment

by:hamda000
ID: 35213917
thanks but I tried those but I'm guetting error messages. I already displayed my code which displays the local mac address but I want the remote one.

Thanks.
0
 

Author Closing Comment

by:hamda000
ID: 35789995
Thanks
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question