Solved

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

Posted on 2014-01-19
4
885 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 26

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 26

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 69

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
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…

707 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

14 Experts available now in Live!

Get 1:1 Help Now