PDA

View Full Version : Drive GetInformation SerialNumber ?


goukilord10
10-06-2007, 09:48 AM
Drive.GetInformation("D:\\").SerialNumber;
how is this calculated ?
its not explained in the help file.

longedge
10-06-2007, 10:04 AM
The serial number is part of the table returned by the Drive.GetInformation action e.g.

result = Drive.GetInformation("C:");
sernumber=result.SerialNumber

Desolator
10-06-2007, 02:12 PM
He asked how it's calculated. I guess it's taken from the registry.

longedge
10-06-2007, 02:50 PM
He asked how it's calculated. I guess it's taken from the registry.

I can see that.

It may well be that I have misinterpreted the question but at least I provided a definitive answer as opposed to a guess ;)

The drive.GetInformation action returns a table which includes the drive label, file system and serial number.

When a drive is formatted under DOS or Windows the drive label, file system and serial number is generated and recorded on the drive.

Since the information created by a format and that retrieved by the AMS action are the same, it's possible that the information is retrieved from the hard drive boot sector where Windows or DOS stores it, but I don't know whether that is the case or not.

goukilord10
10-07-2007, 09:29 AM
well i wish one of the staff answer the question
because even if the drive is a cd/dvd drive we can get the serial and they dont have boot sector.
tried burning the a disc over and over and the serial keep changing :huh

longedge
10-07-2007, 01:44 PM
well i wish one of the staff answer the question
because even if the drive is a cd/dvd drive we can get the serial and they dont have boot sector.
tried burning the a disc over and over and the serial keep changing :huh

The information written to a floppy or hard drive when formatted is based on an algorithm which uses the current time/date, so I've always understood anyway. Presumably something similar is used to generate the serial number of the CD/DVD when it's burned and the information is written to the initial sector of the media, although I have heard that the way/format of information that's written differs between manufacturers.

Let's see if one of the I.R. staff pick this up and answer the question for you :)

Lorne
10-09-2007, 10:18 AM
It's using the Windows GetVolumeInformation (http://msdn2.microsoft.com/en-us/library/aa364993.aspx) API call.

What it returns is "the volume serial number that the operating system assigns when a hard disk is formatted."

I would assume the volume serial number applies when any media is formatted.

Note that this has nothing to do with the manufacturer's serial number. To get that you would need to use other methods, such as accessing the drive's S.M.A.R.T. data somehow.

goukilord10
10-09-2007, 01:15 PM
thanks for expaining it details lorne.
i was hoping to get the cd/dvd disc serial/manufacurer infomation to use use it for some sort of copy protection..

Lorne
10-09-2007, 01:24 PM
It might work for that, assuming you're using read-only media. I'm not actually sure if it's something that is stored on the media or not.

Should be easy to test...just get the volume serial number of the same CD on two different systems. If they match, then you should be good to go.

RizlaUK
10-09-2007, 06:13 PM
sside made a dll (.NET) that will get the hardware serial of a drive
http://www.indigorose.com/forums/showthread.php?t=21064

Desolator
10-12-2007, 03:29 AM
AFAIK that will only work if the BIOS is set to allow the serial to be read.

goukilord10
10-13-2007, 06:37 AM
It might work for that, assuming you're using read-only media. I'm not actually sure if it's something that is stored on the media or not.

Should be easy to test...just get the volume serial number of the same CD on two different systems. If they match, then you should be good to go.
well actually tried doing a disc copy and the copied disc serial in the same as the source disc :(
so i guess it cant be used for CP...

sside made a dll (.NET) that will get the hardware serial of a drive
you cant get the serial if the bios dont allow it (its the case in most computers)
however you can get the disc serial and its the same that AMS return.

this is what i was looking to get
by getting this info into ams (this taken from nero CDSpeed) it make it quite hard that someone find the same media you used to make the original so he make a copy.