Unique PC ID From Drive Volume for Licensing?

G

Guest

What is the best/easiest means to return the serial/volume number of the
drive containing the OS using VB.NET?

I'm looking to get this information as a unique ID for
activation/registration of a custom application so as to tie the software to
a single PC. I need something that will work with 98, ME, 2000, XP, and
newer.

Or if anyone has other suggestiosn on best means to generate an ID to tie to
a single PC for licensing I'd appreciate any suggestions. This needs to work
on a stand alone PC with possibly no net access or NIC card. Basically a
basic client PC with little more than the OS and the application.
 
C

Cor Ligthert

ML,

I do not know a shorter one
\\\Set a reference to system.managagemen
Dim disk As New Management.ManagementObject( _
"Win32_LogicalDisk.DeviceID=""C:""")
Dim diskProperty As Management.PropertyData
MessageBox.Show(disk.Properties("VolumeSerialNumber").Value.ToString)
///

However there is not one real complete always working method as you ask.

I hope this helps a little bit?

Cor
 
O

Octavio Telis Aynes

Well...

You could take the Processor ID via WMI and combinate with other IDs like HD
Id or MAC Address from a network card.
In this case, you need a mechanism to ask the customer for the information
in his PC, as a Register program or something like, then you can encrypt
that information an internaly in the app you could evalute a HASH that match
with the code generated by you.

See you...

Octavio Telis Aynés
www.comunidadpuntonet.org/df/


Or if you prefer, use a hardware lock.
 
H

Herfried K. Wagner [MVP]

ML said:
What is the best/easiest means to return the serial/volume
number of the drive containing the OS using VB.NET?

I'm looking to get this information as a unique ID for
activation/registration

There is no easy way to do that. Don't forget that reactivation will be
necessary if a harddisk crashes and is replaced by another disk because the
serial number the licensing algorithm depends on changes. The user will
have to call your support, which will be very expensive for you (hotline 24
hours a day, maybe multiple channels depending on the number of users).

Microsoft's product activations tries to avoid this problem by calculating
an ID from more than one number that doesn't change if only a few of the
components change.

To make a conclusion: The easiest solution is to purchase a 3rd-party
licensing package, or to use .NET's licensing mechanisms when appropriate:

<URL:http://msdn.microsoft.com/library/en-us/cpguide/html/cpconlicensingcomp
onentscontrols.asp>
<URL:http://windowsforms.net/articles/Licensing.aspx>
 
H

Herfried K. Wagner [MVP]

Octavio Telis Aynes said:
You could take the Processor ID via WMI and combinate
with other IDs like HD Id or MAC Address from a network card.

Using the MAC ID is a bad idea, especially when targetting home users, who
don't have a network card in their PC normally. I remember Maya (an
advanced rendering package) relying on the MAC ID, and I remember that
people had to fake a network card in order to get it work on their machine.
 
M

ML

Do not many third party solutions depend on similar schemes?
Which third party licensing tools work best? And don't rely on having net
access?

As for the .NET licensing I cannot seem to make much sense of how to
implement it for an application. It seems overly complex. Know of any
simple examples on using it for application licensing?

It really comes down to there being some inconvenient for the client at the
cost of helping stop some piracy. If we cannot limit piracy then producing
the application is not worth it long term.
 
P

Patrick Ireland

It was great to have the CPU ID available in earlier
chips but Intel dropped the unique internal ID for each
CPU. Maybe if enough people complain to Intel they will
resort the feature. It was definitely the best way to
bond software registration to a particular PC.

Using the Disk ID is not always available. Some SCSI
driver do not have a disk ID. This is particularly true
for server configurations with large, fast drives.
 
R

Richard L Rosenheim

I've have had CPUs fail, and have upgraded CPUs, so utilizing the CPU ID
presents the same issues as using any sort of hard drive ID value.

Richard Rosenheim
 
M

ML

No matter what you use the potential that it will need to be replaced and
reinstalled with a new key is going to happen. If the logic is loose enough
to not require this then it is probably not tight enough to be useful IMHO.
It really comes down to protecting your products.

If a HD needs to be replaced then the software will need to be reinstalled
anyway, so I think this is as good a means as any.

No matter the solution some will have issues with it, even dongles are not
well accepted solutions to many users.
 
M

ML

Since this is actually the Volume Serial created by a Windows format
wouldn't any formatted drive have the serial number?
 
R

Richard L Rosenheim

Yes, I agree with you that any one component can easily end up being
replaced/swapped out. The position I gather that Patrick was taking was to
depend only upon a single device's ID. And the point I was trying to make
that even a CPU can be changed.

Richard Rosenheim
 
M

ML

Yes a single device is not the best way, but for a standard PC the only real
component we can expect to be there in most instances is the HD. The CPU ID
is not always there, the PC may not have a NIC, etc. The other good thing
about the HD is that if it is replaced they will need to do a reinstall
anyway.

It would be nice if there was a better way but it really comes down to
having to tie the software to some physical device in the end, be it a
dongle or a component. The component ID is really nothing more than a built
in dongle when it comes down to it although with a dongles we can be sure
what we have, but then you run into extra cost, compatibility issues, and
lost dongles. No real easy answer.
 
B

BobJ

Re-install is not always necessary when a hard drive is replaced. Ghost has
been around a long time and there are other disk cloning utilities out
there. The method of having an un-install that decremented an install
counter so that a new install could be made was common in the days of floppy
distribution. But the answer is that there is no answer. Some will always
cheat and some will always complain.
BobJ
 
M

ML

On a ghosted drive would not the volume serial be saved as well?
If so this could lead to piracy but there is no solution that can't be
defeated anyway. It comes down to really preventing casual piracy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top