?
Solved

Access remote computer Mac Address with vb.net

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

Cloud Training Guides

FREE GUIDES: In-depth and hand-crafted Linux, AWS, OpenStack, DevOps, Azure, and Cloud training guides created by Linux Academy instructors and the community.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
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…
Suggested Courses

770 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