Solved

Access remote computer Mac Address with vb.net

Posted on 2011-03-16
4
903 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
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Create a datatable in vb.net dynamically 1 22
bound data table problem 2 33
VB.NET String Settings and Temp Folder Question 3 55
Generate Unique ID in VB.NET 21 62
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

829 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