none
License my Access application RRS feed

  • Question

  • Hi, I've been breaking my head with this... I have an Access application (may years of work) with MS SQL backend. I received request to sell my application and I believe it's time now to create licensing mechanism. How do I do that? I assume I need to compile my application to MDE and supply to buyer. now, I need to understand 2 things, first of all how do I update license number in already precompiled application (I don't want to use database for that). and second, I will need to create exe file but I need this exe file to install SQL Server Express as a prerequisite and setup tables and all the rest. Is there any program that can be done? Thank you in advance!
    Monday, April 11, 2016 8:08 AM

Answers

  • You cannot deploy your Access app as a true .exe file. Best you can do is compile it to a .mde/.accde and go from there.

    Regarding licensing - if you're going to sell this "in the wild", then you might consider something like this:

    http://www.ssware.com/cryptolicensing/cryptolicensing_ocx.htm

    I've used that software for years, and have both the .NET and ActiveX versions. It's very robust, and can most definitely secure your Access app from invalid use.

    Peter's Software also has KeyedAccess: http://www.peterssoftware.com/ka.htm

    If you decide to "roll your own", you have to consider many, many scenarios - for example, is the license code you provide intended to be "machine specific", or would you allow the user to validate any number of installations with that code? Do you provide a "trial license" and if so, how? You can spend an enormous amount of time resolving these issues, and in many cases it's wise to use a 3rd party app.

    How will you deploy your application? If it's to be downloaded and installed, then you're likely going to need a code signing certificate (to sign your install package, not the Access application), and a commercial Windows installer tool like InstallShield, InstallAware, InnoSetup, etc. Expect to spend a LOT of time getting your setup just right and remember - it's the first impression your users will have of your software.

    Most commercial installers allow you to define prerequisites, and that can include SQL Server. However, the setup for SSE can be difficult for many end users, so you often provide a setup with a configuration file. There are many tutorials for that, but prepare to spend some time getting things just right.

    Will all your users have Access? Or do you need to account for those without, and provide the Access Runtime? If so, you're going to have to account for that.

    Will your users be running ONLY the version of Access you're providing, or might they also be running other versions of Access? If so, you may potentially run into a lot of troubles when your app "switches" the machine to your version of Access, and their other apps fall over. This is one of the biggest barriers to deploying an Access app in the wild, at least to me.


    -- Scott McDaniel, Microsoft Access MVP

    Tuesday, April 12, 2016 6:56 PM
  • Sure, the file will most certainly be external. A simple text file called license.txt might look like this:

    Acme Tool Company

    Address

    34398394

    So your application on start-up will read the above. Of course if they change the company name, then the hash code and key below now will not match. So The "key" value can be based on the customer name, and can be as simple as adding up the characters as ASCII values. If they edit the above, then the value of the number needs to be changed - they not know how.  So you don't have to encrypt the file, but you need some kind of system that produces a number as a result of the company name or whatever.

    Many years ago, I used this code to make a key:

    fhandle = FreeFile()
       
       On Error GoTo NoDll:
       
       Open strLg1 For Input As fhandle
       ' read in co name
       Input #fhandle, UserCompanyName
    
       Input #fhandle, strAddress
    
       Input #fhandle, ckread
       Close fhandle
       
       strAddressCR = Replace(strAddress, "/", vbCrLf)    
       cksumtest = 0
       For i = 1 To Len(UserCompanyName)
          cksumtest = cksumtest + Asc(Mid(UserCompanyName, i, 1))
       Next i
       
       cksumtest = cksumtest * 113
       cksum = Val(ckread)
       If cksumtest <> cksum Then      
          Call nolicense
       End If
    

    So in above, I just added up the company letters, and then out of the blue decided to multiply the result by 113. You  could use squre root, or even cos (cosin) functions. There really no way someone could figure that out. You can of course google for some type of hash or encrypting code, so how you do this have zillions of choices and approaches.

    Albert D. Kallal (Access MVP)

    Edmonton, Alberta Canada


    • Edited by Albert D. Kallal Tuesday, April 12, 2016 4:00 PM
    • Marked as answer by Timaxusa Thursday, April 14, 2016 8:51 AM
    Tuesday, April 12, 2016 3:58 PM
  • Hi Timaxusa,

    Do you have any other issues about Access developing? If not, I suggest you mark the helpful reply as answer to close this thread. If you have any issues about Peter’s software, I suggest you contact Peter for help. Because Peter is more familiar with it.

    Thanks for your understanding.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Marked as answer by Timaxusa Thursday, April 14, 2016 1:22 AM
    Thursday, April 14, 2016 1:19 AM

All replies

  • Hi Timaxusa,

    >> first of all how do I update license number in already precompiled application

    What do you mean with “license number”? Do you use license number to control who could use mde or not? If so, there is no such license number in access application. You could create your own user authentication with user name and password.

    >> I will need to create exe file but I need this exe file to install SQL Server Express as a prerequisite and setup tables and all the rest.

    With mde file, you could use access application without seeing source code. But there is no such exe file in Access to install SQL server express. In my option, you could use SQL Server as BE, and use Access to connect to this BE, you do not need install SQL Server for every end user.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, April 12, 2016 2:00 AM
  • There are many approaches. A common solution is to have an external file that is your license key. You then write some code to read in that information. (such as customer name, expire date etc.).

    Some good ideas and thoughts on this can be found here:

    http://www.granite.ab.ca/access/demo.htm

    Regards,

    Albert D. Kallal (Access MVP)

    Edmonton, Alberta Canada


    Tuesday, April 12, 2016 2:16 AM
  • Hi Edward,

     Thank you for your reply. I had in mind generating my own license key and store it code but the I'm not sure if it will be possible to update code in already MDE's program. Probably not... 

    With MSSQL, I wanted to create an EXE package which will consist of MDE and SQL Server with all the tables so end user could install everything by installing one exe file. Do you know which program can do that?

    Tuesday, April 12, 2016 8:20 AM
  • Thank you Albert!

     Isn't the external file will be accessable and editable by anyone if I will store my license number there? Or it doesn't matter because it will be encrypted? Problem is that users can copy that license key which will work with multiple applications (Unless I can validate it with hard drive serial number or something along those lines. Am I correct?

    Tuesday, April 12, 2016 8:22 AM
  • Sure, the file will most certainly be external. A simple text file called license.txt might look like this:

    Acme Tool Company

    Address

    34398394

    So your application on start-up will read the above. Of course if they change the company name, then the hash code and key below now will not match. So The "key" value can be based on the customer name, and can be as simple as adding up the characters as ASCII values. If they edit the above, then the value of the number needs to be changed - they not know how.  So you don't have to encrypt the file, but you need some kind of system that produces a number as a result of the company name or whatever.

    Many years ago, I used this code to make a key:

    fhandle = FreeFile()
       
       On Error GoTo NoDll:
       
       Open strLg1 For Input As fhandle
       ' read in co name
       Input #fhandle, UserCompanyName
    
       Input #fhandle, strAddress
    
       Input #fhandle, ckread
       Close fhandle
       
       strAddressCR = Replace(strAddress, "/", vbCrLf)    
       cksumtest = 0
       For i = 1 To Len(UserCompanyName)
          cksumtest = cksumtest + Asc(Mid(UserCompanyName, i, 1))
       Next i
       
       cksumtest = cksumtest * 113
       cksum = Val(ckread)
       If cksumtest <> cksum Then      
          Call nolicense
       End If
    

    So in above, I just added up the company letters, and then out of the blue decided to multiply the result by 113. You  could use squre root, or even cos (cosin) functions. There really no way someone could figure that out. You can of course google for some type of hash or encrypting code, so how you do this have zillions of choices and approaches.

    Albert D. Kallal (Access MVP)

    Edmonton, Alberta Canada


    • Edited by Albert D. Kallal Tuesday, April 12, 2016 4:00 PM
    • Marked as answer by Timaxusa Thursday, April 14, 2016 8:51 AM
    Tuesday, April 12, 2016 3:58 PM
  • You cannot deploy your Access app as a true .exe file. Best you can do is compile it to a .mde/.accde and go from there.

    Regarding licensing - if you're going to sell this "in the wild", then you might consider something like this:

    http://www.ssware.com/cryptolicensing/cryptolicensing_ocx.htm

    I've used that software for years, and have both the .NET and ActiveX versions. It's very robust, and can most definitely secure your Access app from invalid use.

    Peter's Software also has KeyedAccess: http://www.peterssoftware.com/ka.htm

    If you decide to "roll your own", you have to consider many, many scenarios - for example, is the license code you provide intended to be "machine specific", or would you allow the user to validate any number of installations with that code? Do you provide a "trial license" and if so, how? You can spend an enormous amount of time resolving these issues, and in many cases it's wise to use a 3rd party app.

    How will you deploy your application? If it's to be downloaded and installed, then you're likely going to need a code signing certificate (to sign your install package, not the Access application), and a commercial Windows installer tool like InstallShield, InstallAware, InnoSetup, etc. Expect to spend a LOT of time getting your setup just right and remember - it's the first impression your users will have of your software.

    Most commercial installers allow you to define prerequisites, and that can include SQL Server. However, the setup for SSE can be difficult for many end users, so you often provide a setup with a configuration file. There are many tutorials for that, but prepare to spend some time getting things just right.

    Will all your users have Access? Or do you need to account for those without, and provide the Access Runtime? If so, you're going to have to account for that.

    Will your users be running ONLY the version of Access you're providing, or might they also be running other versions of Access? If so, you may potentially run into a lot of troubles when your app "switches" the machine to your version of Access, and their other apps fall over. This is one of the biggest barriers to deploying an Access app in the wild, at least to me.


    -- Scott McDaniel, Microsoft Access MVP

    Tuesday, April 12, 2016 6:56 PM
  • Thank you Albert,

     I've got an idea how to do it. Looks pretty doable for with my level of knowledge and will probably take me 2-3 day to implement this. To be honest, I'd rather use professional 3-rd party system which I need to look and if not, your way is the cleanest and most feasible for me. Thank you again

    Wednesday, April 13, 2016 7:24 AM
  • Thank you Scott!

     ssware looks complicated... but I believe this exactly what I need. Need to carefully study it. I will give it a shot and if it works, I am in business :) Have you tried Peter's Software? Is it worth to try? My customers will have one major setup with SQL Server and all kinds of things in there (functions and so on) and rest of the people will be using run-time and just because run-time is free, I believe they all can use Access 2013 so versions in not an issue. This is big manufacturing tracking solution that I created for my company for many years and now I have other electronic contract manufacturers are interested so I want to get ready because I can start selling this otherwise it can go around the world at no time (((. 

    Wednesday, April 13, 2016 7:32 AM
  • Consult a copyright lawyer first. If you developed this application while working for a company, it may not be yours to sell, unless your company specifically authorized you to sell it. Just make sure you own the copyright.
    Wednesday, April 13, 2016 1:12 PM
  • Thank you Lawrence,

     This is one of the cases when owner of the company developing system for his internal use ))) I started creating this application in 2000 when I opened company and now it become whole big system that people interested to buy. 

    Wednesday, April 13, 2016 9:34 PM
  • Hi Timaxusa,

    Do you have any other issues about Access developing? If not, I suggest you mark the helpful reply as answer to close this thread. If you have any issues about Peter’s software, I suggest you contact Peter for help. Because Peter is more familiar with it.

    Thanks for your understanding.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Marked as answer by Timaxusa Thursday, April 14, 2016 1:22 AM
    Thursday, April 14, 2016 1:19 AM