Solved

VB.net Windows Forms app - get information unique to that computer

Posted on 2014-01-19
4
891 Views
Last Modified: 2014-01-19
Hi

I want to get certain information about a users PC by sending each user a Windows Forms app that gathers information which is unique to that PC.
I know so far that I can use My.Computer.Name
What other information can I get that is unique to only that PC and what code would I use
0
Comment
Question by:murbro
  • 2
4 Comments
 
LVL 27

Accepted Solution

by:
MacroShadow earned 334 total points
ID: 39792006
I admire your spirit, never give up!

The most commonly used is the disk serial (not the partition serial!), there are many ways to retrieve the serial, some using third party dll's.

Here is one: http://dllstore.net/Products/MachineId.aspx

Read this article http://www.codeproject.com/Articles/28678/Generating-Unique-Key-Finger-Print-for-a-Computer
0
 
LVL 27

Assisted Solution

by:MacroShadow
MacroShadow earned 334 total points
ID: 39792027
    Imports System
    Imports System.Management

    Public Class clsComputerInfo

        Friend Function GetProcessorId() As String
            Dim strProcessorId As String = String.Empty
            Dim query As New SelectQuery("Win32_processor")
            Dim search As New ManagementObjectSearcher(query)
            Dim info As ManagementObject

            For Each info In search.Get()
                strProcessorId = info("processorId").ToString()
            Next
            Return strProcessorId

        End Function

        Friend Function GetMACAddress() As String

            Dim mc As ManagementClass = New ManagementClass("Win32_NetworkAdapterConfiguration")
            Dim moc As ManagementObjectCollection = mc.GetInstances()
            Dim MACAddress As String = String.Empty
            For Each mo As ManagementObject In moc

                If (MACAddress.Equals(String.Empty)) Then
                    If CBool(mo("IPEnabled")) Then MACAddress = mo("MacAddress").ToString()

                    mo.Dispose()
                End If
                MACAddress = MACAddress.Replace(":", String.Empty)

            Next
            Return MACAddress
        End Function

        Friend Function GetVolumeSerial(Optional ByVal strDriveLetter As String = "C") As String

            Dim disk As ManagementObject = New ManagementObject(String.Format("win32_logicaldisk.deviceid=""{0}:""", strDriveLetter))
            disk.Get()
            Return disk("VolumeSerialNumber").ToString()
        End Function

        Friend Function GetMotherBoardID() As String

            Dim strMotherBoardID As String = String.Empty
            Dim query As New SelectQuery("Win32_BaseBoard")
            Dim search As New ManagementObjectSearcher(query)
            Dim info As ManagementObject
            For Each info In search.Get()

                strMotherBoardID = info("SerialNumber").ToString()

            Next
            Return strMotherBoardID

        End Function
       
    End Class

Open in new window


from: http://www.vbforums.com/showthread.php?508069-VB-NET-2005-A-Simple-Class-for-Getting-Hardware-Info

Thing you should know:

1. Not all motherboards have an imbedded serial.
2. There is a simple software that will change the MAC address.
0
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 166 total points
ID: 39792135
0
 

Author Closing Comment

by:murbro
ID: 39792180
Thanks very much for the help
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

831 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