By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,254 Members | 2,477 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,254 IT Pros & Developers. It's quick & easy.

Serial number of drive

P: n/a
Hi,

Do memory sticks have serial numbers like harddrives? If so how can I get
this, I want to uniquely identify a memory stick (removable drive) for
authentication.

Thanks
Jul 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
bump.
<di********@discussion.microsoft.com> wrote in message
news:eM**************@TK2MSFTNGP10.phx.gbl...
Hi,

Do memory sticks have serial numbers like harddrives? If so how can I get this, I want to uniquely identify a memory stick (removable drive) for
authentication.

Thanks

Jul 21 '05 #2

P: n/a
> rives? If so how can I get
this, I want to uniquely identify a memory stick (rem


I guess no one responded because you get into the argument of hard drive
serial numbers not being unique and changeable by the user, if you can live
with that, then you can put a similar serial number on the memory stick
since it is a function of the formatting scheme (ie, FAT32) and not of the
device.

--
gabriel
Jul 21 '05 #3

P: n/a
We control these memory sticks and we want a hardware dependant ID, and thus
the serial number if thats present. Kinda like a dongle.

I dont mean the drive label. I want to have it check the drive type of
"removalble drive" and also any unique ID on that hardware like a serial
number or something.

How can I get hardware specific information within C#?
"gabriel" <no@no--spam.com> wrote in message
news:b7***************************@msgid.meganewss ervers.com...
rives? If so how can I get
this, I want to uniquely identify a memory stick (rem
I guess no one responded because you get into the argument of hard drive
serial numbers not being unique and changeable by the user, if you can

live with that, then you can put a similar serial number on the memory stick
since it is a function of the formatting scheme (ie, FAT32) and not of the
device.

--
gabriel

Jul 21 '05 #4

P: n/a
> I dont mean the drive label.

Here's the beginning of a directory listing:

C:\>dir
Volume in drive C has no label.
Volume Serial Number is 9047-0567

The label and the serial number displayed here are both changeable by the
user and both are stored as "special" hidden filenames in the file
system. You can change both of these with special utilities that modify
the file directory directly (or there may be O/S utilities included...).

This serial number is NOT set in hardware.

The serial number was created in DOS to identify when a user had changed
a floppy disk, that is all. There was no intention of security in this.
I want to have it check the drive type
of "removalble drive" and also any unique ID on that hardware like a
serial number or something.


You do it in three steps then:

1) Somehow verify that the "removable device" is _your_ device and not
floppy or memory stick from another manufacturer.

2) Write a device driver-type of file that peeks into the memory
addresses (or sectors, etc...) to read the embedded serial number.
Windows will not let you do this natively (talking directly to devices or
memory addresses is a huge no-no) so you have to do some of what device
drivers do. This cannot be be done in a .NET language.

3) Create a .NET interface to talk to your non-.NET library that reads
the serial number from your device. This would be done along the lines
of how you call a Windows API function from .NET or how you call an
unmanaged C/C++ DLL from .NET.

--
gabriel
Jul 21 '05 #5

P: n/a
We once had a demonstration \ training on a piece of software by a very well
known software house.

Their software security was based on the unique ID of the harddrive.

Out of 14 of us in the room, 4 PC had the same "unique" ID for their hard
drives.

Made us laugh.

Rollasoc

"gabriel" <no@no--spam.com> wrote in message
news:2b***************************@msgid.meganewss ervers.com...
I dont mean the drive label.


Here's the beginning of a directory listing:

C:\>dir
Volume in drive C has no label.
Volume Serial Number is 9047-0567

The label and the serial number displayed here are both changeable by the
user and both are stored as "special" hidden filenames in the file
system. You can change both of these with special utilities that modify
the file directory directly (or there may be O/S utilities included...).

This serial number is NOT set in hardware.

The serial number was created in DOS to identify when a user had changed
a floppy disk, that is all. There was no intention of security in this.
I want to have it check the drive type
of "removalble drive" and also any unique ID on that hardware like a
serial number or something.


You do it in three steps then:

1) Somehow verify that the "removable device" is _your_ device and not
floppy or memory stick from another manufacturer.

2) Write a device driver-type of file that peeks into the memory
addresses (or sectors, etc...) to read the embedded serial number.
Windows will not let you do this natively (talking directly to devices or
memory addresses is a huge no-no) so you have to do some of what device
drivers do. This cannot be be done in a .NET language.

3) Create a .NET interface to talk to your non-.NET library that reads
the serial number from your device. This would be done along the lines
of how you call a Windows API function from .NET or how you call an
unmanaged C/C++ DLL from .NET.

--
gabriel

Jul 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.