Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
I have been made C# 2010 Application.
I am using Motherboard Serial number to register my application.
 
using System.Management;
ManagementObjectSearcher MOS = new ManagementObjectSearcher(“Select * From Win32_BaseBoard”);
foreach (ManagementObject getserial in MOS.Get())
{
     txtCompanyKey.Text = getserial[“SerialNumber”].ToString();
}
 
It works very well in most of the computers. But some computers return NULL or EMPTY string.
My idea is that old motherboards cannot return serial Number. If my idea is true or not please give me some solution.
Thanks
Posted 14-Feb-13 9:34am
Comments
Sergey Alexandrovich Kryukov at 14-Feb-13 14:41pm
   
What could be a solution if this data is not available? You already know that there is no a solution for the motherboard unique number, so, if you still need a solution, tell us: a solution for what?
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It's not true - some modern ones don't either.
The problem is that the data is not "required for compatibility" - so it's cheaper not to add it, so it doesn't get added by all manufacturers.
 
Sorry, but you can't rely on the MB serial number alone for any form of security (and many of the others can be spoofed as well)
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 14-Feb-13 15:09pm
   
Agree, a 5.
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

The simple answer is that you simply cannot rely on this value to do this. There is no solution.
 
What you need to do is find another way to register your application. Perhaps you could gather information on multiple parts of a machine and then generate a hash from those values so that as long as one of those components exist you get a valid result. Save the hash at that point.
 
My personal perspective is that tying a piece of software down to a specific machine is in no way a good way to register an application, so I would suggest looking to do this in a completely different way.
 
To learn a little more read this[^] article.
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 14-Feb-13 15:08pm
   
Good points, a 5.
—SA
Espen Harlinn at 14-Feb-13 15:09pm
   
Good points :-D
Marcus Kramer at 14-Feb-13 15:20pm
   
Thanks, Espen.
Marcus Kramer at 14-Feb-13 15:20pm
   
Thanks, Sergey.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

This works most of the time[^], but I'm afraid you'll find it a bit of a bother.
 
Another option is to look for the BIOS Serial number[^], using Wmi32_BIOS[^]
 
Best regards
Espen Harlinn
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 14-Feb-13 15:08pm
   
My 5. A combination of some not 100% unique features can make for "almost unique" configuration, but it does not look fair to the users. What, no upgrade, no transfer to a different machine?
—SA
Espen Harlinn at 14-Feb-13 15:14pm
   
Thank you, Sergey :-D
>>What, no upgrade, no transfer to a different machine?
Office 2012:http://www.geek.com/articles/geek-pick/retail-copies-of-office-2013-are-tied-to-a-single-computer-forever-20130213/#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled&id=I0_1360872795974&parent=http%3A%2F%2Fwww.geek.com&rpctoken=62649594
Marcus Kramer at 14-Feb-13 15:21pm
   
Just because Microsoft does it doesn't make it good... :)
Espen Harlinn at 14-Feb-13 15:28pm
   
True ...
Sergey Alexandrovich Kryukov at 14-Feb-13 15:23pm
   
What?! It sucks. Thank goodness I have older Office from my previous MSDN subscription which was already successfully transferred. However, if I did not have it, I would not be sorry... :-)
—SA
Espen Harlinn at 14-Feb-13 15:30pm
   
More than a few people are a bit unhappy about the new license ... but I guess most don't really care all that much, as it's not them that pays for the package.
Sergey Alexandrovich Kryukov at 14-Feb-13 15:41pm
   
That's why this business survives... :-)
—SA
hamaranewton at 15-Feb-13 2:10am
   
Every computer has unique BIOS Serial Number or not????? if answer is not then multiple computer generate same registration key....
Marcus Kramer at 14-Feb-13 15:31pm
   
You and me both, Sergey. I wonder if this restriction will apply to my MSDN version of 2013? I haven't checked if it is a retail version or not.
Espen Harlinn at 14-Feb-13 15:35pm
   
I've only seen it mentioned in relation to the boxed retail version ...
Sergey Alexandrovich Kryukov at 14-Feb-13 15:46pm
   
Yes, I noticed that...
—SA
Sergey Alexandrovich Kryukov at 14-Feb-13 15:45pm
   
It depends on MSDN subscription kind. I usually used something called "Visual Studio Professional with MSDN" "level"; and it provides access to a choice of different versions. If I really need something, I make sure I get/generate my licenses and download products for different versions, just in case. And Office 2013 a case when you might want some older versions. After all, who cares if it is the newest one or, say, 2007?
—SA
Espen Harlinn at 14-Feb-13 15:50pm
   
64-bit users comes to mind ..., it's been a while since I last ran out of licenses, and then MS supplied new codes over the phone ... which was nice of them ...
hamaranewton at 15-Feb-13 2:09am
   
Every computer has unique BIOS Serial Number or not?????
if answer is not then multiple computer generate same registration key....
Espen Harlinn at 15-Feb-13 3:57am
   
I'm afraid not, it's just something to try when Win32_BaseBoard does not return a serial number. If you want something that is really unique, you'll have to retrieve the MAC address of the physical network card for the computer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 295
1 OriginalGriff 273
2 Aajmot Sk 234
3 Marcin Kozub 205
4 Richard MacCutchan 200
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,127
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 14 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100