Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 532
  • Last Modified:

Protect Access program

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
MAS
Asked:
MAS
  • 5
  • 4
  • 3
2 Solutions
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
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
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
MASTechnical Department HeadAuthor Commented:
I have user authentication.
But not sure how to control that. I have a table to store username and password.
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
MASTechnical Department HeadAuthor Commented:
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
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
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
 
MASTechnical Department HeadAuthor Commented:
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
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
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
 
MASTechnical Department HeadAuthor Commented:
Yes you are right I saw first it installed runtime and copied the DB.

How to do the same?
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
<<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
 
MASTechnical Department HeadAuthor Commented:
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now