Retrieve Hard Disk Serial Number or othe unique PC identifier - XP & 2K

  • Thread starter Thread starter Paul Bromley
  • Start date Start date
P

Paul Bromley

Ok - I have given up on trying to find the active IP address for a given PC.
For licensing purposes I need to retrive a unique identifier from the PC
that the program is installed on. The Hard disk serial number would do fine,
but on Googling it seems that some of the sample code will now laways work
on W2K, and not without administrator rights.

Hence my question - how can I consistently get a UNIQUE PC identifier using
vb.net 2003 - not bothered what the idnetifier is providing that it works
100% of the time on XP and W2K.

Best wishes


Paul
 
Paul,

This is often asked although to get the harddisk serial number is as easy as
all serial numbers don't have all hard disk serial numbers. The same is for
processor numbers.

In fact there is not one hard address on the computer you surely can test
beside maybe the Mac address of a network adapter.

Be aware that your approach can lead that clients turning away from you,
because they are completely 24 hours 7 days a week depending from you or
your helpdesk, who surely should be done by professionals (expensive
persons). If not you can be bailed for high amounts of money if there goes
something wrong, and in this case not only in the USA.

Cor
 
If you want some protection, consider using a hardware dongle. USB dongles
are small and quite cheap these days. Of course it all depends on the value
of each sale for your software. If it's expensive, it obviously won't be
worth it.
 
Have you considered using a cryptographic type approach? It may be
possible, for example, to generate a unique identification key for the
machine, say based on a few different factors like the MAC address, the
machine name, and the capacity of the C: hard drive, then use some
simple obfuscation method to hide how you did it, store the key in the
registry if needed, and send a copy to yourself so you have it on
record.

That may prove to be a relatively cheap, effective way to "lock down"
licensing issues.

For the "authorisation" component you could have the software require a
counter-key that comes from you. Use something like public / private
key pairs, or Diffie Hellman, and then let the client install validate
itself based on the response. With Diffie Hellman, the agreed key could
be sent back with the "public" part of your half of the authorisation,
which also serves to make the authorisation key nice and long.

This should be able to be coded quite easily with a little time. There
are plenty of maths libraries available to do the number crunching for
you.

I hope that this helps

Cheers

The Frog
 
Try this

Dim mo As New ManagementObjectSearcher( _
"root\CIMV2", _
"SELECT * FROM Win32_NetworkAdapterConfiguration")

For Each mac As ManagementObject In mo.Get()

Debug.WriteLine("MACAddress: " & CType(mac("MACAddress"), String))

Next
 
Download GetDiskSerial.DLL at http://www.devlib.net to help you!

The GetDiskSerial.DLL is a standard 32-bit DLL file.You can use it to
read the serial number of hard disk easily. As we all know, this serial
number is unique in the world. So this DLL is of great use, for
example, you can use this serial number to creat an encrypt number.

Key Features
*Easy to obtain the serial number of hard disk.
*Support reading several physics hard disks.
*Many development languages are supported, such as the Delphi,
C++Builder, VC, C#, VB, VB.NET, PowerBuilder, Visual Foxpro, Clarion
etc is available.
*Read more parameters, such as Model Number, Revision Number, Buffer
Size, Cylinders, Heads, Sectors per track, etc.
*Not require administrator rights in Win NT/2000/XP.


Product Sheet:
http://www.devlib.net/getdiskserial.htm

Trials are available at
http://www.devlib.net/download/getdiskserial.zip

For more information, please visit
http://www.devlib.net


"Paul Bromley дµÀ£º
"
 
Back
Top