Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Access remote computer Mac Address with vb.net

Posted on 2011-03-16
4
Medium Priority
?
913 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 2000 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

647 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