LicenseGenie™ License Management Class
Intended Purpose and Behavior
(back to top)
LicenseGenie™ intends to dramatically simplify the process of managing the users of your
software products based on a single-user/single-PC licensing model. Users can
transfer your software to another computer, but need to register the software
with the new computer. Users can also transfer their license to another user,
but in doing so lose the permission to use your software themselves until they pay the license fee again
(click here for more details).
If properly incorporated into your software products a call to LicenseGenie™’s
LicenseIsValid() method triggers the following steps
(detailed decision diagram):
-
Each time the user launches your software and if internet access is available the support e-mail
address and the product web page URL registered with the application are downloaded to the client
from the Software Central database and saved in a developer info file for future reference
(details below).
-
When the software is launched for the first time and internet
access is available, the user will be prompted to register with
Software Central. If no internet access is available, the user will receive
a message that the software will terminate.
-
When the registration with Software Central is
completed an encrypted license key file is
created (details below). This license
file needs to be present for subsequent launches to complete. Moving or modifying the file
will render the license invalid. Please check the
License Scenarios
page for all possible responses.
-
The revision number of the software version installed on the user PC is checked against
the revision number registered with Software Central. The user is offered the option to
update the software if a newer version is available. For this to be possible the .msi package
of the revision associated with the registered revision number must be available on the
product web site.
To help you evaluate the utility of LicenseGenie™ we created LicenseGenieTestDrive™
which lets you explore its response to a number of license scenarios for fictitious software titles.
Click here for a more detailed description and download
-
.NET Framework 2.0 or later
-
Developer must be registered with Software Central
-
Application must be registered with Software Central
-
Optional: a product web page
(required for the revision update module of LicenseGenie™)
Subsequent to the discovery of a valid license LicenseGenie™ will present the user with the option
to upgrade the application if the developer has published a newer version on the application web site.
For this feature to work properly, the developer must have posted the latest .msi package
on the application web site AND must have updated the profile of the application in
Software Central's database with the latest version number.
The LicenseGenie™ class encapsulates the complete license management process,
but exposes only a few members:
Constructors:
LicenseGenie: Initialized a new instance of the LicenseGenie class
Methods:
LicenseIsValid: Returns true if the user's license is valid, false if it isn't.
Properties:
AppDevLogo:
Sets the Image to be used for the developer logo in LicenseGenie™’s dialogs. By default LicenseGenie™ uses the image available on the Software Central server.
AppLogo: Sets the Image to be used for the application logo in LicenseGenie™’s dialogs.
AppTitle: Sets the name of the application. The default is Application.ProductName.
DevEMail: Gets the e-mail address of the developer of the application from Software Central's database.
DevName: Gets the name of the developer of the application from Software Central's database.
DevWebPage: Gets the URL of the web page of the developer of the application from Software Central's database.
Software Central uses a MS Access database with the following tables:
Developers:
- DevName
- Password (encrypted)
- DevEMail
- DevWebPage
- DateRegistered
Applications:
- AppName
- Description
- Revision
- DevName
- DateRegistered
- ProductSupportEMail
- ProductPage
- ListPrice
- TrialDays
Users:
- AppName
- AppRevision
- LicenseGenieRevision
- DateRegistered
- LastRun
Folder:
C:\Users\{user name}\AppData\Local\LicenseGenie\{application name}
File name:
DeveloperInfo.xml
Contents:
<Developer>{developer name}</Developer>
<DevEMail>{developer e-mail address}</DevEMail>
<DevWebPage>{developer web page URL}</DevWebPage>
Folder:
C:\Users\{user name}\AppData\Local\LicenseGenie\{application name}
File name:
LicenseInfo.xml
Contents:
<Software Package>{application name}</Software Package> [not encrypted]
<Registration Date>{registration date}</Registration Date> [encrypted]
<License Fee>{license fee (in $)}</License Fee> [encrypted]
<Trial Length>{length of trial (in days)}</Trial Length> [encrypted]
Once the user paid the license fee (or donated) the following entries are added:
<UserName>{user name}</UserName> [encrypted]
<PCName>{PC name}</PCName> [encrypted]
<EMail>{user e-mail address}</EMail> [encrypted]
At this point, LicenseGenie™ requires that the developers manually register
their users as paid (by utilizing Software Central's 'Show Users' page)
as soon as they received their license fee payments or donations.
We are working on an upgrade that will automate this process using PayPal.
IMPORTANT NOTE: In order to protect against the possibility to bypass its
functionality with a surrogate DLL, the LicenseGenie™ DLL should be embedded
into the developer code as opposed to being explicitly included in the msi
package. This is best accomplished by using Microsoft's ILMerge
module.
Example: ilmerge /out:{product name.exe} {primary assembly.exe}
LicenseGenie.dll
Code implementation requires only a few steps. After including a reference to LicenseGenie.dll, the following lines of code need to be added:
VB.NET
Imports SoftwareCentral
'In main program:
Dim myLicenseGenie As LicenseGenie = New LicenseGenie()
'optionally (default is Application.ProductName):
myLicenseGenie.AppTitle = "Your Software Title"
'optionally (not required if you submitted
'your logos (.gif or .jpg) to Software Central)
'and assuming you called your logos 'DevLogo' and 'AppLogo':
myLicenseGenie.AppDeveloperLogo =
{Your Namespace}.Properties.Resources.DevLogo;
myLicenseGenie.AppLogo =
{Your Namespace}.Properties.Resources.AppLogo;
If myLicenseGenie.LicenceIsValid() <> True Then End
'or something similar
C#
using SoftwareCentral;
// In main program:
LicenseGenie myLicenseGenie = new LicenseGenie();
//optionally (default is Application.ProductName):
myLicenseGenie.AppTitle = "Your Software Title";
//optionally (not required if you submitted
//your logos (.gif or .jpg) to Software Central)
//and assuming you called your logos 'DevLogo' and 'AppLogo':
myLicenseGenie.AppDeveloperLogo =
_
{Your
Namespace}.Properties.Resources.DevLogo;
myLicenseGenie.AppLogo =
_
{Your Namespace}.Properties.Resources.AppLogo;
if (!myLicenseGenie.LicenceIsValid()) Application.Exit();
//or something similar
All sensitive data are encrypted with a proprietary encryption scheme. Here are some
encryption examples (for those of you looking for challenges). Please let us know
if you were able to break the code.
SoarentComputing:
88C9180868E8B7D7A7A8F71828B708CA
office@soarentcomputing.com:
775757E718E76BB7D71867F7B74A0717F6574738772757F7186707
John Smith:
D8BA1868C8D888782A5D
Now try to decode this:
291B6829291819294A093D88
Have fun!