473,545 Members | 2,001 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to generate product key?

Hi,

I would like to have my users register their name and organization name and
submit them through email so that we can generate a product key for them.
But we have no idea how to generate a product key something look like
Microsoft's product key. In addition, I would like to have the key generated
based on their name and company name.

Any idea on how to go about doing this using VB.NET? Thanks in advance.

Regards,
Antonio

Feb 4 '07 #1
6 15432
Why not use an encryption algorithm such as Blowfish (.NET version avail
here: http://www.hotpixel.net/software.html). Encrypt the Organization Name
using the User Name as the password. Take the encrypted output and format it
how you wish (divide it into 5-character segments, delimited with dashes,
chopping it down to the length you want).
"Antonio" <an*******@hotm ail.comwrote in message
news:7F******** *************** ***********@mic rosoft.com...
Hi,

I would like to have my users register their name and organization name
and submit them through email so that we can generate a product key for
them. But we have no idea how to generate a product key something look
like Microsoft's product key. In addition, I would like to have the key
generated based on their name and company name.

Any idea on how to go about doing this using VB.NET? Thanks in advance.

Regards,
Antonio

Feb 4 '07 #2
Almost weekly the same question is asked in this newsgroup & you'll get
pointed to the same few controls like the ASPOSE one by the MVP's

Doesn't anyone write there own one of do like the MVP's & search Google for
the answer?

--
Newbie Coder
(It's just a name)
Feb 5 '07 #3
"Newbie Coder" <ne*********@sp ammeplease.comw rote in
news:#l******** ******@TK2MSFTN GP05.phx.gbl:
Doesn't anyone write there own one of do like the MVP's & search
Google for the answer?
Writing a licensing control is a lot of work - especailly to make it
bulletproof and reliable...
Feb 5 '07 #4
Newbie Coder wrote:
Almost weekly the same question is asked in this newsgroup & you'll get
pointed to the same few controls like the ASPOSE one by the MVP's

Doesn't anyone write there own one of do like the MVP's & search Google for
the answer?
There are problems with simply supplying code samples for what the OP is
seeking -

1. To provide the functionality required needs much more than a code
snippet, it usually requires an entire application to show how you might
do it.

2. Showing someone's solution may pose a risk of exposing
Code/Algorithms that people have spent a long time perfecting and don't
want to become public knowledge. (For obvious reasons).
Nonetheless, I HAVE provided details in earlier posts, and do so again
now, in hope that the OP will obtain some inspiration to develop his/her
own -

(Sample of my Code that uses the Serial Number of the HDD as part of the
Application Serial Number)

*******
I use the following code (watch for wrapping!) -

Imports System.Manageme nt

''' <summary>
''' String of 1 to 2 chars. eg. "C" or "C:".
''' </summary>
''' <param name="sDriveLet ter"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function GetDriveSerialN umber(ByVal sDriveLetter As String) As String

If Len(sDriveLette r) = 1 Then
sDriveLetter &= ":"
Else
sDriveLetter = Strings.Left(En vironment.Syste mDirectory, 2)
End If

Dim HardDiskInfo As New ManagementObjec t("Win32_Logica lDisk.DeviceID= "
& ChrW(34) & sDriveLetter & ChrW(34))
Dim HardDiskPropert y As PropertyData =
HardDiskInfo.Pr operties("Volum eSerialNumber")
Return HardDiskPropert y.Value.ToStrin g

End Function

I first obtain the Drive Serial Number and then ensure it is
8-Characters in length -

Dim sA As String =
GetDriveSerialN umber(Strings.L eft(Environment .SystemDirector y, 2))

Dim N As UInt16 = Len(sA)
If N < 8 Then
sA = sA.PadRight(8 - N, "0")
ElseIf N 8 Then
sA = Strings.Left(sA , 8) 'Truncate to 8 Chars.
End If

After this I "AND" the value with another routine that automatically
generates an 8-Character HEX number based on the title of my software.
I then end up with a 16-Character HEX number, which is unique to each of
my applications and unique on every computer, I then do some more
XOR'ing and present this to the User as the Application Serial Number.

I obviously have another application that reverses all of this to
provide an Unlock Code that the User enters.

There are literally hundreds of Users running my applications using this
method, and although it really only stops the honest pirates, it serves
my purposes well.

If you'd like to see an example, please download one of my apps (written
for specific clients) from the following site -

http://www.arnfieldcomputerservices....di/publish.htm

This will provide an example of what my Registration Screen looks like.

If you require any further assistance, please feel free to contact me
direct via the email address used in this post.

*******
FootNote: When this code sample was last posted, I received warnings
from others that not all systems have drives with Serial Numbers. I
don't dispute this (although I've NEVER seen it) so you might want to
consider an additional or an alternative means of obtaining a unique
number from the system. (ie. MAC Address etc.)
ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Feb 5 '07 #5
Shane

In my opinion very correct especially about this one
2. Showing someone's solution may pose a risk of exposing Code/Algorithms
that people have spent a long time perfecting and don't want to become
public knowledge. (For obvious reasons).
Cor
Feb 5 '07 #6
Whatever protection you use it will always be cracked

--
Newbie Coder
(It's just a name)
Feb 5 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1927
by: Tools | last post by:
WinTranslator & MacTranslator Demo Editions Generate Design Diagrams from Your Source Code in Minutes Placitas, NM ? April 5, 2004 - Excel Software is pleased to announce the immediate availability of Demo editions of its WinTranslator and MacTranslator reengineering tools. When used in conjunction with the WinA&D or MacA&D modeling tools,...
6
3806
by: Sebastien | last post by:
Hi, I am building a products database, linking sales and production. Each part has a unique sales Stock Code and Production Number. The sales stock code is a combination of letters and numbers taken from the part name (BrandA 300 4 Bladed : B3004B). The production number is a 4 or 5 digits number with first figure(s) indicating category...
12
1657
by: anna | last post by:
Map, generate, and maintain 50% of your .NET application code, namely your business and data objects. Use these objects in ASP.NET, Windows Forms, console or services applications. Business and Data Objects Framework -- Map objects to relational databases -- Embed SQL, stored procedure calls, and business rules -- Generate .NET components...
4
1416
by: cardinallijr | last post by:
Hi all, sorry about the simple question but I'm new to XSL. I have a XML with 5 elements, for example: <root> <products> <product> <id>1</id> </product> <product>
1
3348
by: urban.john | last post by:
Here are my steps: create resource files from resx files: <echo message="CREATING RESOURCE FILES FROM RESGEN EN" /> <resgen todir="product\resources_en" verbose="true"> <resources> <include name="${AppName}\**.en.resx" /> <include name="${AppName}\Global.asax.resx" /> </resources>
9
9122
by: Paul | last post by:
Hi, I have spent the last couple of days researching this issue. And I have also spent time thinking about what is needed. I am distributing my software as shareware. When a customer orders a license, I send him/her a printed license with a license number that can be used to unlock certain features in the software. A license number...
20
7819
by: jjmillertime | last post by:
I'm new so i apologize if this is in the wrong spot. I'm also new to programming in C and i've been searching for quite a while on how to create a program using C that will generate two random numbers, multiply them, and ask you for the result. It also needs to have four responses for both right and wrong answers and should print them...
5
1418
by: grasshopper2 | last post by:
I am looking to build a regular expression that will match pTOC(somenumber) where the number varies between 1& ten, this is to generate a table of contents file that I desperately need to display in my online help tab within an existing web application. I am still fairly new to perl if anyone could help me do this I will be forever in your debt....
1
2469
by: divyac | last post by:
I am doing an inventory project using PHP in which there is a text box.The customer id should be entered in that text box.If that customer id is valid,another text box should be generated in which the product id should be entered..If that product id is valid,other 3 text boxes should be generated dynamically in order to do transaction.is it...
0
7479
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7411
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5987
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4962
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.