Hard Drive Serial Number Delphi

Posted on
Hard drive serial number changer
17 Feb 2004CPOL
Shows you how to obtain the hardware serial number set by the manufacturer and not the Volume Serial Number that changes after you format a hard drive.

Get Physical Drive Serial Number – Part 1 5 Replies One frequently asked question is “how to (programmatically) get the serial number of a physical drive?” or “ how to find my hard disk serial number? Get Hard Disk Serial Number Delphi XE3. How to get hard disk serial number for NTFor windows 9. I can use an API call 'Get. The hard disk number of a local hard- disk. However when I change. Z: ) as below. Hard Disk Serial Number Changer Download. How can I get the serial number of a hard. How to get hard drive serial number.

Introduction

RE: serial number from USB flash drive Glenn9999 (Programmer) 16 May 08 21:37 One thing you find out about Delphi is that it is very niche, and consequently many things are not written for it in examples. I built the code segment by using Delphi XE 7 and tested it on my. Is there a way to read the serial no? Or eventually, how can I. I use this to get hard drive.

Making sure your software is used by legal buyers is a concern for programmers around the world. My professor once said that we shouldn’t give 100% of our code to the users because there are people out there that are smart enough to decompile our programs and find the various verification algorithms used. He suggested that we give users 99% of our software, but keep the remaining 1% to ourselves. This 1% is the verification algorithm to confirm only valid users can use the program; this is commonly known as “activation.”

Activation is good, but it means our software users will need to have Internet access and that means small programmers like us have to set up a server that can validate users. Of course, only big companies with big clients can afford to do this. For the rest of us, we have to think of other ways.

One method programmers have used since the DOS era was to bind their software to the Hard Drive Volume Serial Number. This is not a good choice, as later we all find out that every time we format the same hard drive, a new Volume Serial Number is generated.

Background

A better solution is to get the Hard Drive Serial Number given by the Manufacturer. This value won't change even if you format your Hard Drive. Of course, if people buy new hard drive, we have a problem. But at least we keep the regular hard-drive formatters happy!

The Code

Hard Drive Serial Number Delphi Number

First, let's create a class to store information about a hard drive:

Next, add a reference to your project. Scroll down to System.Management under ComponentName. This reference is not provided by default, so you need to add it.

Add a 'using System.Management;' at the top of your source code. System.Management allows us to access WMI objects. Put simply, WMI contains a lot information about your hardware.

Now there's a problem: the hard drive model is found in the Win32_DiskDrive class and the serial number is found in the Win32_PhysicalMedia class. Thus, we need to query twice and integrate the information into our HardDrive class.

Let's first create an ArrayList to store our HardDrive objects: ArrayList hdCollection = new ArrayList();. Next, we query the Win32_DiskDrive class:

Now we need to extract the serial number from the Win32_PhysicalMedia class:

Luckily, the WMI objects from Win32_DiskDrive are in the same order as from Win32_PhysicalMedia, so the simple code above works. Otherwise, we will have to match them using their unique DeviceID. Start a thread in this article if you think Win32_DiskDrive objects are not the same order as Win32_PhysicalMedia objects returned.

We are done! Now we display our hard drive's information:

Hard Drive Serial Number Delphi

Conclusion

If a user has more than one hard drive, I suggest you display the available hard drives to the user. Ask him which hard drive he's not planning to upgrade soon, then use that hard drive serial number to generate a license key. This will prevent your user from nagging for a new license key in short time.

If your user finally decides to upgrade hard drive, you may give this article's demo application to the user and ask him what the serial number is. Alternatively, you can create a much more user-friendly GUI one. :)

Because it is difficult to find appropriate sacrifices, Ni Surti takes advantage of Rita (Sally Marcelina), a young woman who has been abused by her philandering husband, to look for victims. Her husband brings her to Ni Surti for healing. Ni Surti gains influence over Rita when the young woman is injured in a fall from the terrace of her multi-storied home. Film susuk nyi roro kidul

Hope you find this useful.

Hard Drive Serial Number Delphi

Windows Hard Drive Serial Number

Hard Drive Serial Number Delphine

How to get the hard disk serial number of a network drive?
I know that there is a function called 'GetVolumeInformationA' and with this funcion, I can get the serial number of a local drive. However when I change the local drive to network drive (say Z:) as below: lb_ret = GetVolumeInformationA('Z:', VolName, Len(VolName), VolSerial, MCompLen, VolFlgs, VolFileSys, Len(VolFileSys)) 0 instead of a proper serial number is returned as the VolSerial. Please advise! Tilden Lau Doesn't the solution given for the local harddrive on wednesday work on the network? -Charles Tin wrote: > I know tha..
Get Hard Disk Serial Number Delphi XE3
I have been using this great component from Devlib for many years in D7, D2010 and XE2 http://www.devlib.net/tgetdiskserial.htm The Delphi XE3 VCL installs without problem, but in an application the GetDiskSerial registrations are not recognised and Delphi.. crashes (Close down)! They claim it works but not on my computer. Please install this and report if it works on your Delphi XE3 system? > {quote:title=Pieter van Wyk wrote:}{quote} > Please install this and report if it works on your Delphi XE3 system? I looked as far as the 'buy' button and just started laughing..
Get Hard disk serial no.
Hi, I have a requirement, where I need help. We are developing a VB application, where I need to avoid users from misusing the application. So we track the serial no of the hard disk on which he has installed the program. But the issue here is that we are not able to get the actual Harddisk number of the system from where we are running the application. We are making use of an OCX file and try to get the Serial No. This OCX returns the serial no of the hard disk on which the application is developed on. But if the same app is run from a differnt system as an exe, then it returns the sl..
Getting the hard drive serial number
Is there an easy way to obtain the hard drive serial number (the factory ID, not the one created by windows). Thanks Michael Michael Gurnett <> wrote: >Is there an easy way to obtain the hard drive serial number (the factory ID, not the one created by windows). Google is your friend. http://www.google.com/search?hl=en&q=hard+drive+serial+number The only 'easy' way would be to download a library that does it for you. http://www.diskserialnumber.com/ DiskID32: Code and interesting links near bottom of page http://www.winsim.com/diskid32/diskid32.html ..
Get real serial no. for hard disk
Hi all how can I get the real serial no for hard disk, I know there is API function called GetVolumeInformation but I want the real serial no. how can I get it I am using PB11.5 and ASA11 thanks finestraco http://www.rgagnon.com/pbdetails/pb-0214.html You will need to change the definition to GetVolumeInformationW instead of GetVolumeInformationA because PB 10+ is Unicode. -- Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do Product Enhancement Requests: http://my.isug.com/cgi-bin/1/c/submit_enhancement <finestraco> wrote in message news:4c0a..
Get Hard Drive Serial Number
Hi,Is it possible for me to get the hard drive serial number of the client's machine in my web application?Thanks I wouldn't think so, since ASP.Net is a server side language - and I would shudder with fear if this were actually possible...David WierMCP/ASPInsiderASPNet101.com - where to look first!Please Vote for ASPNet101 - 'Best Community Resource'!Control Grouper - easily control properties for multiple controls with one control!Calendar Express - The Best HTML Calendar Generator on the web!(Please 'Mark as Answer' when it applies) Yes, I am now realizing ..
How to get hard disk serial number for NT
For windows 95 and 98, I can use an API call 'GetVolumeInformationA' to get the hard disk number of a local hard-disk. However it does not work for NT 4.0 workstation and servers. The serial number returned is '0000-0000' which is incorrect. Please advice if there is another specific API call for getting serial number from a NT 4.0 workstation. Tilden That function is supposed to work on NT as well. However, the function itself has a bug with regard to reporting the serial number for remote drives. You might want to look at: http://support.microsoft.com..
Need code to get hard disk serial number
Does anyone have a working piece of PowerScript code to read the hard disk volume serial number under Win95? This is the eight character string (such as '3733-1ED8') that you see when you run the ChkDsk command. Thanks in advance, Justin - Remove the X from my reply to address! - Justin Purington jnp@mottthehoople.mv.com - Use this API function GetVolumnInformationA( ) This function returns information about the harddrive. Global External Function: FUNCTION boolean GetVolumeInformation(ref string lpRootPathName,ref string lpVolumeNameBuffer,ulong nVolu..
Getting MAC address or Serial number of Hard disk
Hi, I would like to track whether my client come back my site or not. Is it possible to get MAC address or Serial Number of hard disk of client PC accessing our site?ThanksTran Hong Quang There is no direct way of doing this in ASP.NET. However, you could use WMI in ASP.NET, and I beleive WMI can tell you that information.Cheers, Kevin JonesMy Blog..
The trick to get the real serial number of hard drive
I have just published a blog post about a solution that works both in XP and Vista under user account privilage without using P/Invoke. Everyone knows how to get serial number of hard drives but it took me over 50 hours to figure out how to do it in .Net without any user privilage problem. Here is the direct link to the blog entry. Happy Coding! Very cool stuff, you are to be commended for your hard work digging up these details and how to leverage them.Chris LoveASP.NET 2.0 Your Visual Blueprint for developing Web Applications Not bad at all. Now, if you really want to take it to &q..
Installing new hard drive to replace smaller volume on another drive
OK folks, We're installing a new drive in our NetWare 4.11sp9 server. The server is an IBM Netfinity 5000. It took us a while to source the 'hotswap drive tray' part, but we eventually got one! The new drive is a Seagate Cheetah 10K.6 - 73.4 GB - hot- swap SCSI Ultra320 - 10000 rpm - 8 MB. Phew! The server already has two drives installed. We are not using a RAID array. On these two drives, we have 3 volumes - SYS and APPS on one drive, and DATA on the other. We've fitted the drive into the hotswap tray, and inserted it into the server. It seems to l..
Upgrading Hard Drives in 4.11 server: Volume SYS: and Data Drive
I am planning on upgrading the hard drives in our 4.11 sp9 server shortly. We currently have 4 mirror sets containing a volume on each one. There are 3 SCSI controllers in our server: 1 for the tape backup, and 2 for the other volumes. The controllers are Ultra2 and Narrow/Wide SCSI 2 for the volume hard disks, and Ultra 160 for the tape backup. My plan is to remove the SCSI 2 controller and replace it with an Ultra 160 or Ultra 320 controller, and replace the 4 drives on that chain with 320 drives. This will require moving two of our data volumes to the new drives, and moving the..
hard disk serial no
Is anyone have the idea to get hard disk serial no by using pb7? Use Win32 API call: Function long GetVolumeInformationA(string lpRootPathName, ref string lpVolumeNameBuffer, ulong nVolumeNameSize, ref ulong lpVolumeSerialNumber, ref ulong lpMaximumComponentLength, ref ulong lpFileSystemFlags, ref string lpFileSystemNameBuffer, ulong nFileSystemNameSize) Library 'KERNEL32.DLL' Renato Di Pauli 'Teo' <dkteo@tm.net.my> ha scritto nel messaggio news:43d75c17@forums-2-dub.. > Is anyone have the idea to get hard disk serial no by using pb7? >..
Serial No. of Hard Disk.
Dear all, I'm using PB 6.5.1 with Access 97. The deployment platforms are Win95/98 and Workstation. I would like to know is that any API calls that I can get the Serial No. of the Hard Disk??? It is because I want to use it as the product key in order to prevent duplication. Any suggestions are appreciated! Best Regards, Andy Cheung GetVolumeInformationA. Here's the declaration for it: FUNCTION boolean GetVolumeInformationA( string lpRootPathName, // address of root directory of the file system REF string lpVolumeNameBuffer, // address of name of..