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

Unique Machine Identifier

P: n/a
JJ
Now I know this question has been asked many times, but I cannot seem to
find a good site which summarises the methods possible in vb .net.

I am after a way of producing a unique serial number for my app. The program
would produce a unique identifier for the computer, then I would psovide the
user with a serial number unique to their machine.

In other words I would like to check for things like:
i) Hard disk (not volume) serial number
ii) CPU serial number
iii) Video card serial number (?)
(iv) Any other unique number I could use.

The program will be using vb. net 2003 (.net 1.1) and will only be run on
Windows 2000 and XP.

I realise there may be commercial solutions out there, but I am only a poor
programmer and would like to save money and do it myself.

If there is anywhere you can point me to in order to get started on this,
please, please reply to this post.

JJ
Apr 3 '06 #1
Share this Question
Share on Google+
18 Replies


P: n/a
JJ
OK so on further reading, it seems there is no reliable way to get hardware
serial numbers (correct me if I am wrong).

Some programmers have suggested one of the two methods:

(a) generate a randon number (with a checksum etc) that is something to do
with the date. This is presented to the user. The user
MUST then call the help desk, and give them this number. The help desk then
use a decoder to provide a one time only use key
(b) generate a unique number that is something to do with the date and MAC
address of the NIC (or the virtual NIC used by dial up networking). Use this
as a seed for a Luhn-Mod checksum to produce a unique serial number.

Can anyone comment as to whether I am heading down the right lines? I think
I prefer option (a) as it seems slightly simpler and probably more
reliable...?

Thanks
JJ

"JJ" <ab*@xyz.com> wrote in message
news:OK****************@TK2MSFTNGP09.phx.gbl...
Now I know this question has been asked many times, but I cannot seem to
find a good site which summarises the methods possible in vb .net.

I am after a way of producing a unique serial number for my app. The
program would produce a unique identifier for the computer, then I would
psovide the user with a serial number unique to their machine.

In other words I would like to check for things like:
i) Hard disk (not volume) serial number
ii) CPU serial number
iii) Video card serial number (?)
(iv) Any other unique number I could use.

The program will be using vb. net 2003 (.net 1.1) and will only be run on
Windows 2000 and XP.

I realise there may be commercial solutions out there, but I am only a
poor programmer and would like to save money and do it myself.

If there is anywhere you can point me to in order to get started on this,
please, please reply to this post.

JJ

Apr 3 '06 #2

P: n/a
Hi,

The CPU's id is not always available.

Windows Serial Number
http://www.vb-tips.com/default.aspx?...b-6d3050562a04

Ken
---------------
"JJ" <ab*@xyz.com> wrote in message
news:OK****************@TK2MSFTNGP09.phx.gbl...
Now I know this question has been asked many times, but I cannot seem to
find a good site which summarises the methods possible in vb .net.

I am after a way of producing a unique serial number for my app. The
program would produce a unique identifier for the computer, then I would
psovide the user with a serial number unique to their machine.

In other words I would like to check for things like:
i) Hard disk (not volume) serial number
ii) CPU serial number
iii) Video card serial number (?)
(iv) Any other unique number I could use.

The program will be using vb. net 2003 (.net 1.1) and will only be run on
Windows 2000 and XP.

I realise there may be commercial solutions out there, but I am only a
poor programmer and would like to save money and do it myself.

If there is anywhere you can point me to in order to get started on this,
please, please reply to this post.

JJ

Apr 3 '06 #3

P: n/a
"JJ" <ab*@xyz.com> schrieb:
Now I know this question has been asked many times, but I cannot seem to
find a good site which summarises the methods possible in vb .net.

I am after a way of producing a unique serial number for my app. The
program would produce a unique identifier for the computer, then I would
psovide the user with a serial number unique to their machine.

In other words I would like to check for things like:
i) Hard disk (not volume) serial number
ii) CPU serial number
iii) Video card serial number (?)
(iv) Any other unique number I could use.


(v) The machine's SID:

<URL:http://groups.google.de/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/6c2803622a6bc9d2/7a4c404486381793>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Apr 3 '06 #4

P: n/a
JJ
I've managed to get the serial numbers I want to use (namely the windows
serial and the computer SID. Now I am looking to be able to encrypt the
numbers into a fixed size serial number that my program can authenticate.

I guess this means using something like MD5 and getting my prog to check the
checksum?

Can anyone help here? Perhaps point me int he right direction?

Thanks JJ

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
"JJ" <ab*@xyz.com> schrieb:
Now I know this question has been asked many times, but I cannot seem to
find a good site which summarises the methods possible in vb .net.

I am after a way of producing a unique serial number for my app. The
program would produce a unique identifier for the computer, then I would
psovide the user with a serial number unique to their machine.

In other words I would like to check for things like:
i) Hard disk (not volume) serial number
ii) CPU serial number
iii) Video card serial number (?)
(iv) Any other unique number I could use.


(v) The machine's SID:

<URL:http://groups.google.de/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/6c2803622a6bc9d2/7a4c404486381793>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Apr 3 '06 #5

P: n/a
Have you looked as generating a GUID from your serial nos?
--
Dennis in Houston
"JJ" wrote:
I've managed to get the serial numbers I want to use (namely the windows
serial and the computer SID. Now I am looking to be able to encrypt the
numbers into a fixed size serial number that my program can authenticate.

I guess this means using something like MD5 and getting my prog to check the
checksum?

Can anyone help here? Perhaps point me int he right direction?

Thanks JJ

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
"JJ" <ab*@xyz.com> schrieb:
Now I know this question has been asked many times, but I cannot seem to
find a good site which summarises the methods possible in vb .net.

I am after a way of producing a unique serial number for my app. The
program would produce a unique identifier for the computer, then I would
psovide the user with a serial number unique to their machine.

In other words I would like to check for things like:
i) Hard disk (not volume) serial number
ii) CPU serial number
iii) Video card serial number (?)
(iv) Any other unique number I could use.


(v) The machine's SID:

<URL:http://groups.google.de/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/6c2803622a6bc9d2/7a4c404486381793>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Apr 4 '06 #6

P: n/a
JJ
Hi Dennis.

I have collected the:
Windows serial number;
Computer SID;
Disk (volume) serial number;
Motherboard serial number.

I was hoping that someone would have a nice bit of code that allows you to
plug in a load of numbers and come out with a nice neat 32 digit (for
example) serial number using some complicated algorithm.
that my prog could verify. (I realise that not all of these serial number
may be available on all machines, so my methods must allow for perhaps any
two of these being preset.)

I am not so good at the maths so would appreciate if anyone can point me in
a direction that may help.

TIA,

JJ
"Dennis" <De****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
Have you looked as generating a GUID from your serial nos?
--
Dennis in Houston
"JJ" wrote:
I've managed to get the serial numbers I want to use (namely the windows
serial and the computer SID. Now I am looking to be able to encrypt the
numbers into a fixed size serial number that my program can authenticate.

I guess this means using something like MD5 and getting my prog to check
the
checksum?

Can anyone help here? Perhaps point me int he right direction?

Thanks JJ

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> "JJ" <ab*@xyz.com> schrieb:
>> Now I know this question has been asked many times, but I cannot seem
>> to
>> find a good site which summarises the methods possible in vb .net.
>>
>> I am after a way of producing a unique serial number for my app. The
>> program would produce a unique identifier for the computer, then I
>> would
>> psovide the user with a serial number unique to their machine.
>>
>> In other words I would like to check for things like:
>> i) Hard disk (not volume) serial number
>> ii) CPU serial number
>> iii) Video card serial number (?)
>> (iv) Any other unique number I could use.
>
> (v) The machine's SID:
>
> <URL:http://groups.google.de/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/6c2803622a6bc9d2/7a4c404486381793>
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://classicvb.org/petition/>


Apr 4 '06 #7

P: n/a
JJ,

If you take so much don't forget the Mac address which is on a network
adapter.
If it is there than it almost for sure unique.

Be aware that this kind of methods have finished software companies.

Cor

"JJ" <ab*@xyz.com> schreef in bericht
news:er**************@TK2MSFTNGP09.phx.gbl...
Hi Dennis.

I have collected the:
Windows serial number;
Computer SID;
Disk (volume) serial number;
Motherboard serial number.

I was hoping that someone would have a nice bit of code that allows you to
plug in a load of numbers and come out with a nice neat 32 digit (for
example) serial number using some complicated algorithm.
that my prog could verify. (I realise that not all of these serial number
may be available on all machines, so my methods must allow for perhaps
any two of these being preset.)

I am not so good at the maths so would appreciate if anyone can point me
in a direction that may help.

TIA,

JJ
"Dennis" <De****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
Have you looked as generating a GUID from your serial nos?
--
Dennis in Houston
"JJ" wrote:
I've managed to get the serial numbers I want to use (namely the windows
serial and the computer SID. Now I am looking to be able to encrypt the
numbers into a fixed size serial number that my program can
authenticate.

I guess this means using something like MD5 and getting my prog to check
the
checksum?

Can anyone help here? Perhaps point me int he right direction?

Thanks JJ

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> "JJ" <ab*@xyz.com> schrieb:
>> Now I know this question has been asked many times, but I cannot seem
>> to
>> find a good site which summarises the methods possible in vb .net.
>>
>> I am after a way of producing a unique serial number for my app. The
>> program would produce a unique identifier for the computer, then I
>> would
>> psovide the user with a serial number unique to their machine.
>>
>> In other words I would like to check for things like:
>> i) Hard disk (not volume) serial number
>> ii) CPU serial number
>> iii) Video card serial number (?)
>> (iv) Any other unique number I could use.
>
> (v) The machine's SID:
>
> <URL:http://groups.google.de/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/6c2803622a6bc9d2/7a4c404486381793>
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://classicvb.org/petition/>


Apr 4 '06 #8

P: n/a
JJ
Hi Cor.

What do you mean by : "> Be aware that this kind of methods have finished
software companies.
"

Do you mean that these methods are a pain for end users?

Thanks,

JJ

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:Od**************@TK2MSFTNGP11.phx.gbl...
JJ,

If you take so much don't forget the Mac address which is on a network
adapter.
If it is there than it almost for sure unique.

Be aware that this kind of methods have finished software companies.

Cor

"JJ" <ab*@xyz.com> schreef in bericht
news:er**************@TK2MSFTNGP09.phx.gbl...
Hi Dennis.

I have collected the:
Windows serial number;
Computer SID;
Disk (volume) serial number;
Motherboard serial number.

I was hoping that someone would have a nice bit of code that allows you
to plug in a load of numbers and come out with a nice neat 32 digit (for
example) serial number using some complicated algorithm.
that my prog could verify. (I realise that not all of these serial number
may be available on all machines, so my methods must allow for perhaps
any two of these being preset.)

I am not so good at the maths so would appreciate if anyone can point me
in a direction that may help.

TIA,

JJ
"Dennis" <De****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
Have you looked as generating a GUID from your serial nos?
--
Dennis in Houston
"JJ" wrote:

I've managed to get the serial numbers I want to use (namely the
windows
serial and the computer SID. Now I am looking to be able to encrypt the
numbers into a fixed size serial number that my program can
authenticate.

I guess this means using something like MD5 and getting my prog to
check the
checksum?

Can anyone help here? Perhaps point me int he right direction?

Thanks JJ

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> "JJ" <ab*@xyz.com> schrieb:
>> Now I know this question has been asked many times, but I cannot
>> seem to
>> find a good site which summarises the methods possible in vb .net.
>>
>> I am after a way of producing a unique serial number for my app. The
>> program would produce a unique identifier for the computer, then I
>> would
>> psovide the user with a serial number unique to their machine.
>>
>> In other words I would like to check for things like:
>> i) Hard disk (not volume) serial number
>> ii) CPU serial number
>> iii) Video card serial number (?)
>> (iv) Any other unique number I could use.
>
> (v) The machine's SID:
>
> <URL:http://groups.google.de/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/6c2803622a6bc9d2/7a4c404486381793>
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://classicvb.org/petition/>



Apr 4 '06 #9

P: n/a
>
Do you mean that these methods are a pain for end users?

Yes especially as they can not reach you, they have to change a computer
part and they need to have a result the next day.

Cor
Apr 4 '06 #10

P: n/a
JJ
I understand as I've been there.

However this software is a time limited software for a specific project, and
I want to tie it to the client and stop any possible use in the future, and
on other machines.

Thanks,

JJ

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:ek**************@TK2MSFTNGP12.phx.gbl...

Do you mean that these methods are a pain for end users?

Yes especially as they can not reach you, they have to change a computer
part and they need to have a result the next day.

Cor

Apr 4 '06 #11

P: n/a
JJ wrote:
However this software is a time limited software for a specific
project, and I want to tie it to the client and stop any possible use
in the future, and on other machines.


To help tie it to the client, you could have their name boldly displayed
throughout it - "For the exclusive use of XYZ Corp" - which would hopefully
disuade other companies from using it. As to the time limitation, just check
the date when your program starts and every now and again whilst it's
running; yes, they could change the date on their computer, but that tends
to mess up other things too.

Andrew
Apr 4 '06 #12

P: n/a
JJ
Hi Andrew.

Yes I've got their logo all over it. Though maybe you're right about making
it a little more 'legal' looking with a "For the exclusive use of...' note.

I've managed to combat the time limitation by use of the licensemanager and
a few discreet registry keys inserted on install.
I am hoping the additional serial number strategy will help me with other
projects too though, so I still want to include it.

Thanks,

JJ

"Andrew Morton" <ak*@in-press.co.uk.invalid> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
JJ wrote:
However this software is a time limited software for a specific
project, and I want to tie it to the client and stop any possible use
in the future, and on other machines.


To help tie it to the client, you could have their name boldly displayed
throughout it - "For the exclusive use of XYZ Corp" - which would
hopefully disuade other companies from using it. As to the time
limitation, just check the date when your program starts and every now and
again whilst it's running; yes, they could change the date on their
computer, but that tends to mess up other things too.

Andrew

Apr 4 '06 #13

P: n/a
JJ
Hi Andrew.

Yes I've got their logo all over it. Though maybe you're right about making
it a little more 'legal' looking with a "For the exclusive use of...' note.

I've managed to combat the time limitation by use of the licensemanager and
a few registry keys inserted on install.
I am hoping the additional serial number strategy will help me with other
projects too though, so I still want to include it.

Thanks,

JJ
"Andrew Morton" <ak*@in-press.co.uk.invalid> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
JJ wrote:
However this software is a time limited software for a specific
project, and I want to tie it to the client and stop any possible use
in the future, and on other machines.


To help tie it to the client, you could have their name boldly displayed
throughout it - "For the exclusive use of XYZ Corp" - which would
hopefully disuade other companies from using it. As to the time
limitation, just check the date when your program starts and every now and
again whilst it's running; yes, they could change the date on their
computer, but that tends to mess up other things too.

Andrew

Apr 4 '06 #14

P: n/a
Wow, replace the NIC one time and your app won't start anymore...

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:Od**************@TK2MSFTNGP11.phx.gbl...
JJ,

If you take so much don't forget the Mac address which is on a network
adapter.
If it is there than it almost for sure unique.

Be aware that this kind of methods have finished software companies.

Cor

"JJ" <ab*@xyz.com> schreef in bericht
news:er**************@TK2MSFTNGP09.phx.gbl...
Hi Dennis.

I have collected the:
Windows serial number;
Computer SID;
Disk (volume) serial number;
Motherboard serial number.

I was hoping that someone would have a nice bit of code that allows you
to plug in a load of numbers and come out with a nice neat 32 digit (for
example) serial number using some complicated algorithm.
that my prog could verify. (I realise that not all of these serial number
may be available on all machines, so my methods must allow for perhaps
any two of these being preset.)

I am not so good at the maths so would appreciate if anyone can point me
in a direction that may help.

TIA,

JJ
"Dennis" <De****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
Have you looked as generating a GUID from your serial nos?
--
Dennis in Houston
"JJ" wrote:

I've managed to get the serial numbers I want to use (namely the
windows
serial and the computer SID. Now I am looking to be able to encrypt the
numbers into a fixed size serial number that my program can
authenticate.

I guess this means using something like MD5 and getting my prog to
check the
checksum?

Can anyone help here? Perhaps point me int he right direction?

Thanks JJ

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> "JJ" <ab*@xyz.com> schrieb:
>> Now I know this question has been asked many times, but I cannot
>> seem to
>> find a good site which summarises the methods possible in vb .net.
>>
>> I am after a way of producing a unique serial number for my app. The
>> program would produce a unique identifier for the computer, then I
>> would
>> psovide the user with a serial number unique to their machine.
>>
>> In other words I would like to check for things like:
>> i) Hard disk (not volume) serial number
>> ii) CPU serial number
>> iii) Video card serial number (?)
>> (iv) Any other unique number I could use.
>
> (v) The machine's SID:
>
> <URL:http://groups.google.de/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/6c2803622a6bc9d2/7a4c404486381793>
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://classicvb.org/petition/>



Apr 4 '06 #15

P: n/a
JJ
Hi Martin - no that won't happen as I'll take a number of serial numbers and
allow the user to change a percentage of them.

JJ

"Martin" <x@y.com> wrote in message
news:uq**************@TK2MSFTNGP11.phx.gbl...
Wow, replace the NIC one time and your app won't start anymore...

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:Od**************@TK2MSFTNGP11.phx.gbl...
JJ,

If you take so much don't forget the Mac address which is on a network
adapter.
If it is there than it almost for sure unique.

Be aware that this kind of methods have finished software companies.

Cor

"JJ" <ab*@xyz.com> schreef in bericht
news:er**************@TK2MSFTNGP09.phx.gbl...
Hi Dennis.

I have collected the:
Windows serial number;
Computer SID;
Disk (volume) serial number;
Motherboard serial number.

I was hoping that someone would have a nice bit of code that allows you
to plug in a load of numbers and come out with a nice neat 32 digit (for
example) serial number using some complicated algorithm.
that my prog could verify. (I realise that not all of these serial
number may be available on all machines, so my methods must allow for
perhaps any two of these being preset.)

I am not so good at the maths so would appreciate if anyone can point me
in a direction that may help.

TIA,

JJ
"Dennis" <De****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
Have you looked as generating a GUID from your serial nos?
--
Dennis in Houston
"JJ" wrote:

> I've managed to get the serial numbers I want to use (namely the
> windows
> serial and the computer SID. Now I am looking to be able to encrypt
> the
> numbers into a fixed size serial number that my program can
> authenticate.
>
> I guess this means using something like MD5 and getting my prog to
> check the
> checksum?
>
> Can anyone help here? Perhaps point me int he right direction?
>
> Thanks JJ
>
>
>
> "Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
> news:%2****************@TK2MSFTNGP12.phx.gbl...
> > "JJ" <ab*@xyz.com> schrieb:
> >> Now I know this question has been asked many times, but I cannot
> >> seem to
> >> find a good site which summarises the methods possible in vb .net.
> >>
> >> I am after a way of producing a unique serial number for my app.
> >> The
> >> program would produce a unique identifier for the computer, then I
> >> would
> >> psovide the user with a serial number unique to their machine.
> >>
> >> In other words I would like to check for things like:
> >> i) Hard disk (not volume) serial number
> >> ii) CPU serial number
> >> iii) Video card serial number (?)
> >> (iv) Any other unique number I could use.
> >
> > (v) The machine's SID:
> >
> > <URL:http://groups.google.de/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/6c2803622a6bc9d2/7a4c404486381793>
> >
> > --
> > M S Herfried K. Wagner
> > M V P <URL:http://dotnet.mvps.org/>
> > V B <URL:http://classicvb.org/petition/>
>
>
>



Apr 4 '06 #16

P: n/a
JJ wrote:
<snip serial number linked to one machine woes>

Thinking about it, if you distrust a customer so much that you'll go to such
extensive and unreliable lengths in an attempt to protect your software, do
you really want to being doing business with them?

Andrew

--
That's why I love VoIP. You don't get people phoning up to complain that the
network is down.
-- Peter Corlett, in the Monastery
Apr 4 '06 #17

P: n/a
JJ
Good point. I do actually have some trust for them, but who knows how
desperate I may get in the future, and who therefore I may have to provide
my software to.....
I thought though that it was a pretty reliable method to get the windows
serial number, and the Windows SID? Am I wrong?

I understand that the hardware serial numbers may be a little more
unreliable, but please do tell me if I am wrong in my above statement.

Thanks,

JJ
"Andrew Morton" <ak*@in-press.co.uk.invalid> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
JJ wrote:
<snip serial number linked to one machine woes>

Thinking about it, if you distrust a customer so much that you'll go to
such extensive and unreliable lengths in an attempt to protect your
software, do you really want to being doing business with them?

Andrew

--
That's why I love VoIP. You don't get people phoning up to complain that
the
network is down.
-- Peter Corlett, in the Monastery

Apr 4 '06 #18

P: n/a
JJ wrote:
I thought though that it was a pretty reliable method to get the
windows serial number, and the Windows SID? Am I wrong?


If you're the one providing the serial number generated from data from a
machine, you have to make sure that the serial number can be obtained at any
time... 02:30 on a Sunday, the middle of your holiday, whenever. And if it's
automatically generated (e.g. through a web site) you have to make sure that
generator is always available, and has 24 hour phone support. Remember that
Murphy's law works every second of every day...

Andrew
Apr 5 '06 #19

This discussion thread is closed

Replies have been disabled for this discussion.