[comp.sys.ibm.pc.misc] DOS 4.0 Volume Serial Numbers

chrisb@hubcap.clemson.edu (Chris Behrens) (01/29/91)

Is there a way to access these ??  Or is there a way to change them ??
Add them to older diskettes (pre-4.0) ??  Or not have them on the 
diskettes at all, or delete them once they are there ??

Thank You.
Chris Behrens.
ChrisB@Hubcap.Clemson.Edu

paul@nuchat.sccsi.com (Paul Hutmacher) (03/05/91)

In article <12818@hubcap.clemson.edu> chrisb@hubcap.clemson.edu (Chris Behrens) writes:
>Is there a way to access these ??  Or is there a way to change them ??

And while we're at it, what the hell are they for?



-- 
Paul Hutmacher    | paul@nuchat.sccsi.com
P.O. Box 66046    | {uhnix1, uunet}!nuchat!paul
Houston, TX 77266 | paul%nuchat.uucp@uhnix1.uh.edu

mir@opera.chorus.fr (Adam Mirowski) (03/05/91)

In article <1991Mar5.033219.369@nuchat.sccsi.com>, paul@nuchat.sccsi.com (Paul Hutmacher) writes:
%% In article <12818@hubcap.clemson.edu> chrisb@hubcap.clemson.edu (Chris 
%% Behrens) writes:
%% >Is there a way to access these ??  Or is there a way to change them ??
%% 
%% And while we're at it, what the hell are they for?
I see 2 purposes:
- copy protection (upon installation an application stores the disk SN)
- diskette identification (although the Disk Change signal could be enough).
-- 
Adam Mirowski,  mir@chorus.fr (FRANCE),  tel. +33 (1) 30-64-82-00 or 74
Chorus systemes, 6, av.Gustave Eiffel, 78182 Saint-Quentin-en-Yvelines CEDEX

tmkk@uiuc.edu (Scott Coleman) (03/05/91)

In article <8105@chorus.fr> mir@opera.chorus.fr (Adam Mirowski) writes:
>In article <1991Mar5.033219.369@nuchat.sccsi.com>, paul@nuchat.sccsi.com (Paul Hutmacher) writes:
>%% 
>%% And while we're at it, what the hell are [Volume Serial Numbers] for?
>I see 2 purposes:
>- copy protection (upon installation an application stores the disk SN)
>- diskette identification (although the Disk Change signal could be enough).

They're also ideal for cataloging: Anyone who downloads as much stuff as
I do from anonymous ftp sites (and pack-rats it away ;-) needs to be
able to keep track of the hundreds of floppies. It's a simple matter to
write a program which reads the directory and serial number from the
disk and stores them in a master database. As long as each disk is
labelled with its serial number, finding those sources to Xtank that you
downloaded in the summer of 1989 is a snap!

gtoye@supernet.dallas.haus.com (Gene Toye) (03/06/91)

mir@opera.chorus.fr (Adam Mirowski) writes:

>In article <1991Mar5.033219.369@nuchat.sccsi.com>, paul@nuchat.sccsi.com (Paul Hutmacher) writes:
>%% In article <12818@hubcap.clemson.edu> chrisb@hubcap.clemson.edu (Chris 
>%% Behrens) writes:
>%% >Is there a way to access these ??  Or is there a way to change them ??
>%% 
>%% And while we're at it, what the hell are they for?

My understanding is that they came about mostly for OS/2 and were added to
DOS 4.0 for compatability.  They are needed in OS/2 to deal with multitasking
since you might remove the diskette while another program was using it.  OS/2
couldn't ask for the disk by the "normal" LABEL since uniqueness is not
guaranteed.
-- 
Gene Toye: Harris Adacom Corporation / 16001 Dallas Pkwy. / Dallas, TX 75248
Internet: gtoye@supernet.haus.com or gtoye@supernet.lonestar.org
Usenet:   uunet!{iex,ntvax}!supernet!gtoye
DISCLAIMER: My employer never knows what I am going to say next.

larry@palan.uucp (Larry Strickland) (03/06/91)

In article <1991Mar5.033219.369@nuchat.sccsi.com> paul@nuchat.sccsi.com (Paul Hutmacher) writes:
>In article <12818@hubcap.clemson.edu> chrisb@hubcap.clemson.edu (Chris Behrens) writes:
>>Is there a way to access these ??  Or is there a way to change them ??
>
>And while we're at it, what the hell are they for?

I'm still not sure what they are for, but they are stored in the boot sector
(in the extended portion of the configuration section) in ASCII!

If you have TurboC (or probably anything else), you can use the absolute
disk read to read the first sector on the disk and you will find it there.
I can change it with debug and there seems to be no effect.  Of course, this
doesn't work on extended (>32M) DOS partitions.

-larry

walters@iccgcc.decnet.ab.com (03/07/91)

In article <1991Mar5.033219.369@nuchat.sccsi.com>, paul@nuchat.sccsi.com (Paul Hutmacher) writes:
> In article <12818@hubcap.clemson.edu> chrisb@hubcap.clemson.edu (Chris Behrens) writes:
>>Is there a way to access these ??  Or is there a way to change them ??
> 

Here is how you get/set the volume serial number.
Others have already posted with regard to the serial numbers usefullness.
Hope this helps!!!!


 INT 21 - DOS 4.0 internal
     AH = 69h
     AL = subfunction
         00h get serial number
         01h set serial number
     BL = drive (0=default, 1=A, 2=B, etc)
     DS:DX -> disk info (see below)

 Return: CF set on error
         AX = error code (see AH=59h)
     CF clear if successful
         AX destroyed
         (AL = 00h) buffer filled with appropriate values from extended BPB
         (AL = 01h) extended BPB on disk set to values from buffer

 Notes:  does not generate a critical error; all errors are returned in AX
     error 0005h given if no extended BPB on disk
     does not work on network drives (error 0001h)
     buffer after first two bytes is exact copy of bytes 27h thru 3Dh of
        extended BPB on disk

 Format of disk info:
 Offset  Size    Description
  00h    WORD    info level (zero)
  02h    DWORD   disk serial number (binary)
  06h 11 BYTEs   volume label or "NO NAME    " if none present
  11h  8 BYTEs   (AL=00h only) filesystem type--string
                       "FAT12   " or "FAT16   "


Tom
No Sig Yet