Solved

Access remote computer Mac Address with vb.net

Posted on 2011-03-16
4
899 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
  • 2
  • 2
4 Comments
 
LVL 20

Accepted Solution

by:
hes earned 500 total points
Comment Utility
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
Comment Utility
This is in VBS but it should be easy to convert
http://www.vbforums.com/showthread.php?t=326425
0
 

Author Comment

by:hamda000
Comment Utility
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
Comment Utility
Thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now