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

Unique PC ID From Drive Volume for Licensing?

P: n/a
ML
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.

Nov 21 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
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.

"ML" <ML@discussions.microsoft.com> escribió en el mensaje
news:12**********************************@microsof t.com...
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.

Nov 21 '05 #2

P: n/a
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("VolumeSerialNumbe r").Value.ToString)
///

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

I hope this helps a little bit?

Cor
Nov 21 '05 #3

P: n/a
"ML" <ML@discussions.microsoft.com> schrieb:
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...nlicensingcomp
onentscontrols.asp>
<URL:http://windowsforms.net/articles/Licensing.aspx>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4

P: n/a
"Octavio Telis Aynes" <ot****@NOSPAMtutordes.com> schrieb:
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.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #5

P: n/a
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.
"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:O8*************@TK2MSFTNGP10.phx.gbl...
"ML" <ML@discussions.microsoft.com> schrieb:
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...nlicensingcomp
onentscontrols.asp>
<URL:http://windowsforms.net/articles/Licensing.aspx>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #6

P: n/a
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.
Nov 21 '05 #7

P: n/a
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.

"BobJ" <bo*@rjsolyn.com> wrote in message
news:SH*******************@newsread3.news.atl.eart hlink.net...
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
"ML" <ml@schoonersolutions.com> wrote in message
news:e5*************@tk2msftngp13.phx.gbl...
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.

"Richard L Rosenheim" <ri*****@rlr.com> wrote in message
news:u$**************@TK2MSFTNGP14.phx.gbl...
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
"ML" <ml@schoonersolutions.com> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
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.

"Richard L Rosenheim" <ri*****@rlr.com> wrote in message
news:O%****************@TK2MSFTNGP11.phx.gbl...
> 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
>
> "Patrick Ireland" <ir*****@airmail.net> wrote in message
> news:14****************************@phx.gbl...
>> 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.
>
>



Nov 21 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.