Solved

Protect Access program

Posted on 2014-04-25
12
526 Views
Last Modified: 2014-05-16
I have developed a program in Access2010.
I would like to protect it from copying the source.
How to protect the piracy?

What is the normal procedure to protect copying?
Is it possible to give them as an exe with the source codes protected?

And there is user authentication.
How to control the number of user?

I want only 2 users to be logged in at a time.
0
Comment
Question by:-MAS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
12 Comments
 
LVL 58
ID: 40022452
With Access, you cannot generate a standalone EXE.

You can distribute your database with a password on the VBA project to protect the source code.   In addition, you can also distribute as a "compiled" app, which is a MDE.  This is a DB with the source code stripped out.

Even with all that however, someone who is very determined could still figure out your code.

To help with that, you could use:

http://www.everythingaccess.com/mdeprotector.htm

In terms of registering/securing your app from a licensing standpoint, there is this:

http://www.peterssoftware.com/ka.htm

Jim.
0
 
LVL 85
ID: 40022539
And there is user authentication.
How to control the number of user?
I want only 2 users to be logged in at a time.
You'd have to control that yourself. Essentially, you'd have to log users when they connect, and log them out when they disconnect. This can be tough to do, especially if you have users who are in the habit of using the power button on their machine to log out.

What's the reason for having only 2 users? If this has to do with licensing, then I'd suggest something like what JimD suggest, or this: http://www.ssware.com/cryptolicensing/cryptolicensing_ocx.htm. This is an industrial strength library that will do what you need. I use it for my .NET projects, but I've used the ActiveX version as well.
0
 
LVL 26

Author Comment

by:-MAS
ID: 40033878
I have user authentication.
But not sure how to control that. I have a table to store username and password.
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 85
ID: 40034204
Not sure how to control what?

If you only want two users in the database, then when User1 logs in you would write a record somewhere (perhaps you'd have a Logins table). When User2 logs in, you check the Logins table to see the number logged in. If it's less than 2, you allow User2 to log in.

When User1 logs out, you either remove that record from the Logins table, or you "close" it (i.e. stamp it with the logout date/time).

The trouble comes when User1 doesn't log out, but instead uses the power button on the machine to close it out, or when the network drops, or any of a dozen other scenarios. When these happen, the Logins table is not updated, and the system will consider User1 to still be logged in.

So back to my comment:

What's the reason for having only 2 users
If you can let us know why you only want two users logged in, we might be able to provide you with better suggestions.
0
 
LVL 26

Author Comment

by:-MAS
ID: 40034220
I started with 2 users. Now they are telling me to give them a user with admin permission to create another user so only 2 users can login at the same time.
Note: I told them you can keep only upto 4 active users.
0
 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 total points
ID: 40034241
Okay, then the technique I suggested would be a good starting point - but as I mentioned, there are quite a few pitfalls with this technique. You would be much better off with a commercial licensing utility that sits outside of the program, and monitors activity. The utility I suggested (CryptoLicensing) does these things, but it's not free (or cheap, for that matter).

I'm also curious if you could use the Jet Roster method for this:

http://www.fmsinc.com/MicrosoftAccess/monitor/database-users.htm

Basically, this "reads" the lock file and determines the number of users in the system. Note that connecting to the lockfile will create a user, so you'd have to account for that  -  - in other words, if two users are in the system and you use the Jet Roster method, it would show 3 users, not 2. You could modify the VBA code sample from that page like this:

Dim iCount As Integer

With rstTmp
    Do Until .EOF
       iCount = iCount + 1      
      .MoveNext
    Loop
End With

If iCount > 3 Then
  Msgbox "More than 2 users are not allowed"
  Application.Quit
End If
0
 
LVL 58
ID: 40034248
The comments that Scott and I posted at the start contain everything you need to protect your app and control the number of users.

Note that were assuming that you telling them they can only have 4 users is a restriction you want and not a problem with the app.

 A well written Access app can handle 30 to 40 users without issue and if a SQL server backend, more than that.

Jim.
0
 
LVL 26

Author Comment

by:-MAS
ID: 40055498
One more thing I have seen one of my friend did this. He just run the exe automaically a shortcut created on desktop and db copued to c drive. I think he just coped the shortcut and and copied the db and created as a package in VS2010.
I am not sure of how he did that or he got it from somewhere else.
Any idea of how it will be?
0
 
LVL 58
ID: 40055894
With Access, you cannot create a standalone .exe

Either the Access run time or the full Retail version must be installed in order to use the DB (they are in fact one in the same, it's just some registry keys that controls the "mode" your allowed to use it in).

I would assume what your friend did is created an install package that included the run time version of Access along with the DB.

Jim.
0
 
LVL 26

Author Comment

by:-MAS
ID: 40056897
Yes you are right I saw first it installed runtime and copied the DB.

How to do the same?
0
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 total points
ID: 40057239
<<How to do the same? >>

There are a couple methods:

1. Manual - Point them to the runtime download on Microsoft's site and then give them a copy of the DB with instructions to install.

2. Create an install package with:

a. VS as your friend did.
b. The Access publish wizard (leaves lots to be desired, which is why your fired probably used VS).
c. Many use INNO setup with good results (http://www.jrsoftware.org/isinfo.php and it's free).
d. Purchase Sagekey scripts.

 The last d, is the most preferable.  Sage has been around for a while, and their install is first rate.  It gives you a totally isolated install from anything else that may be installed on the machine.  Your app will work every time no matter what else that's Access based has been installed there.  Details here:

http://www.sagekey.com/installation_access.aspx

Jim.
0
 
LVL 26

Author Closing Comment

by:-MAS
ID: 40071752
Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question