Click here to Skip to main content
Sign Up to vote bad
good
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 - 8:34

Comments
Sergey Alexandrovich Kryukov - 14 Feb '13 - 14:41
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

3 solutions

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 - 14 Feb '13 - 15:09
Agree, a 5. —SA
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 - 14 Feb '13 - 15:08
Good points, a 5. —SA
Espen Harlinn - 14 Feb '13 - 15:09
Good points :-D
Marcus Kramer - 14 Feb '13 - 15:20
Thanks, Espen.
Marcus Kramer - 14 Feb '13 - 15:20
Thanks, Sergey.
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 - 14 Feb '13 - 15:08
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 - 14 Feb '13 - 15:14
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 - 14 Feb '13 - 15:21
Just because Microsoft does it doesn't make it good... :)
Espen Harlinn - 14 Feb '13 - 15:28
True ...
Sergey Alexandrovich Kryukov - 14 Feb '13 - 15:23
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 - 14 Feb '13 - 15:30
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 - 14 Feb '13 - 15:41
That's why this business survives... :-) —SA
hamaranewton - 15 Feb '13 - 2:10
Every computer has unique BIOS Serial Number or not????? if answer is not then multiple computer generate same registration key....
Marcus Kramer - 14 Feb '13 - 15:31
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 - 14 Feb '13 - 15:35
I've only seen it mentioned in relation to the boxed retail version ...
Sergey Alexandrovich Kryukov - 14 Feb '13 - 15:46
Yes, I noticed that... —SA
Sergey Alexandrovich Kryukov - 14 Feb '13 - 15:45
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 - 14 Feb '13 - 15:50
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 - 15 Feb '13 - 2:09
Every computer has unique BIOS Serial Number or not????? if answer is not then multiple computer generate same registration key....
Espen Harlinn - 15 Feb '13 - 3:57
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
Your Filters
Interested
Ignored
     
0 Mohammed Hameed 268
1 Sergey Alexandrovich Kryukov 238
2 OriginalGriff 236
3 Mayur_Panchal 153
4 Dave Kreskowiak 125
0 Sergey Alexandrovich Kryukov 8,171
1 OriginalGriff 6,236
2 CPallini 3,482
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 14 Feb 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid