How To Get Computer Serial Number In Vbnet

Is it possible to read the serial number of a USB drive using VB. Reading the serial number of USB storage device in Vb. Get unique Hardware id from PC. Ask Question -1. CPU ID and MAC address based hardware ID and Hard Drive serial number. HWID are not recommended as a licencing system as it isn't accurate and not practical if the user changes computer or formats the drives etc. It is more recommended to use a certificate system or more complex.

What thatraja didn't mention, and probably doesn't know about, is that these methods don't work for all hard drives. Overall, there are I think 4 different methods for retrieving the hard drive serial number, so long as they are not in a RAID configuration. Which of the methods works depends on the drive. There is no way to tell ahead of time which will work and which don't. You'd have to write code to try all 4 methods, then evaluate the return data for your actual value. No, I don't have example code.

I prefer (and use) the following function: Public Function GetDriveSerialNumber() As String Dim DriveSerial As Integer ' Create a FileSystemObject object Dim fso As Object = CreateObject( ' Scripting.FileSystemObject') Dim Drv As Object = fso.GetDrive(fso.GetDriveName(Application.StartupPath)) With Drv If.IsReady Then DriveSerial =.SerialNumber Else ' 'Drive Not Ready!' DriveSerial = -1 End If End With Return DriveSerial.ToString( ' X2') End Function Perhaps the Thread-Starter likes it too. When answering a question please: • Read the question carefully. • Understand that English isn't everyone's first language so be lenient of bad spelling and grammar. • If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem.

Insults are not welcome. • Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid.

Unscrew case. Take off cover (or side depending on age of computer) Retrieve flashlight from the junk drawer. Drovosek 3 mihajlov Make sure flashlight batteries are charged by sticking battery to toungue. (Warning kids dont try this at home) Turn on flashlight. Point flashlight at a 90 degree angle into pc case. Be carful not to shine in your eyes. Look on board.

For serial number. LOL Just joking. I dont know of any software to do it.

You could try ASTTRA32 (advanced systemsinfo tool and reporting assistant) can be downloaded for free @ Try looking in the case as well it should have it in little white letters on the board. Everything has a serial number.

Thats how they keep up with RMA's and such. By mahine i would guess you mean motherboard/mainboard. Hope that helped.

Code: Public Function SystemGUID() As String Dim sGUID As String = ' Dim objHDDSearcher As New System.Management.ManagementObjectSearcher('SELECT * FROM Win32_PhysicalMedia') For Each hardDrive As System.Management.ManagementObject In objHDDSearcher.Get() On Error Resume Next sGUID += hardDrive('SerialNumber').ToString Next Return sGUID.Trim End FunctionThis is how I generate a system GUID by taking all of the HDD serial numbers. I figured by saying machine serial number you might possibly mean the hard drive serial number and that's how you get it. Hope this helps. • → *new* Get practical advice and learn best practices for moving your applications from RDBMS to the Couchbase Engagement Database. (sponsored) • → Learn to shorten database dev cycles, integrate code quality reviews into Continuous Integration workflow, and deliver code 40% faster.

Number

(sponsored) • → See a demo showing how you can build a globally distributed, planet-scale apps in minutes with Azure Cosmos DB. (sponsored webinar) • → A complete overview of Cloud Computing focused on what you need to know, from selecting a platform to choosing a cloud vendor. • → Better understand the signs that your business has outgrown its current database. (sponsored webinar).

Click Here to Expand Forum to Full Width.