473,396 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Serial number of drive

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
Nov 15 '05 #1
5 2553
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

Nov 15 '05 #2
> 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
Nov 15 '05 #3
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

Nov 15 '05 #4
> 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
Nov 15 '05 #5
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

Nov 15 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Gavin | last post by:
Hi, I'm a newbie to programming of any kind. I have posted this to other groups in a hope to get a response from anyone. Can any one tell me how to make my VB program read the Bios serial number...
15
by: tom | last post by:
Hi, How do I get the serial number of the harddisk in .NET? I want this to be the same number even if the user has reformatted, so I do not want the volume serial number. Thanx, t
3
by: Evgeny Zoldin | last post by:
Hi ALL, how can I get serial number of harddrive using "pure" .NET, without Win API? Thanx
5
by: | last post by:
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
79
by: Klaus Bonadt | last post by:
In order to protect software from being copied without licence, I would like to use something like a key, which fits only to the current system. The serial number of the CPU or the current...
14
by: Lauren Wilson | last post by:
Discovered this interesting comment on MSDN: "To programmatically obtain the hard disk's serial number that the manufacturer assigns, use the Windows Management Instrumentation (WMI)...
9
by: Nebojsa4 | last post by:
Hi. First, sorry on my weak English to all. Qusetion: How to read (in VB) Manufacturer serial number of Hard disk drive? Not volume/serial number of C:, D:, etc. partitons. For reading...
7
by: Adele le Roux | last post by:
Hi All, How can I get the hard disk serial number of a remote computer's C:? The drive will NOT be mapped as a network drive. Thanks, Adele
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.