Posted by EmuMannen on 2, 2000 at 8:28 PM:
In Reply to: Re: For DOS wizards :o) posted by EmuMannen on 2, 2000 at 8:21 PM:
Hey Bugfinder, get a disk info struct with INT 21/440Dh, change the disk serial number in the struct and use the same struct to write with INT 21/6901h if you don't want to guess how to fill the struct by your self :)
And don't blame me if you f*ck up you drives ;)
/ EmuMannen
: Yes there is but I just have to say that I hate machine dependant copy protections...
: Check DOS Kernel service INT 21/6900h to get serial number and INT 21/6901h to set the serial number (also check INT 21/440Dh):
: AH = 69h
: AL = subfunction
: 00h get serial number
: 01h set serial number
: BL = drive (0=default, 1=A, 2=B, etc)
: BH = info level (00h only for DOS; OS/2 allows other levels)
: DS:DX -> disk info (below)
: Return:
: CF set on error or clear if successful.
: Format of disk info:
: Offset Size Description
: 00h WORD 0000h (info level)
: 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 (see #01767)
: Note: under MS-DOS 7.0 or a Windows95 DOS box, the volume label field can be all blanks even when a volume label has been set (the Win95 installation seems to blank the volume label field in the partition boot sector; once LABEL has been run, the volume label is reported correctly).
: Information taken from Ralf Brown's Interrupt List
: / EmuMannen
: : Is there a way to determine the volume serial number of a HD or diskette? I mean, my Samsung 4.3 Gb hard disk after formatted had the number 2844-1DE2. Can this be changed by software? I want to know if there is a way to make a software to check if it is really running in the media it was actually compiled to. If someone tries to copy a program that was originally compiled to run in a HD with the number "1234-5678" then the program won't run... Unless there is a way to change manually this number. Is it possible? I know every time a person formats the HD or diskette, another version would be necessary.
: : Thanks for any help!
: :
: : Bugfinder