Securing database against being copied

  • Thread starter Thread starter laura
  • Start date Start date
L

laura

I am writing quite a simple names and addresses database with a few more
features for a charity. Because it's a charity, I am doing this at a very
reasonable cost. I am going to install the programme on one computer next
week. I have a very strong feeling that someone else in the organisation
will copy my programme and use it for their own side of the business. I do
not want this to happen as I am doing the software for one person only.

I do not have any passwords or security settings nor do I have workgroup
administrations. They did not wish for it to be password controlled. I do
not wish to tell the person for whom I am writing the software that I
suspect someone else will wish to copy it.

What I would like to know, please - is there any simple way of adding
something hidden somewhere in the code which only I know about, which I can
set up on the one computer where I am installing the programme, whereby, if
someone tries to copy it to another computer, it will not work? The simpler
the better.

Thanks
Laura
 
laura said:
I am writing quite a simple names and addresses database with a few more
features for a charity. Because it's a charity, I am doing this at a very
reasonable cost. I am going to install the programme on one computer next
week. I have a very strong feeling that someone else in the organisation
will copy my programme and use it for their own side of the business. I do
not want this to happen as I am doing the software for one person only.

I do not have any passwords or security settings nor do I have workgroup
administrations. They did not wish for it to be password controlled. I do
not wish to tell the person for whom I am writing the software that I
suspect someone else will wish to copy it.

What I would like to know, please - is there any simple way of adding
something hidden somewhere in the code which only I know about, which I
can set up on the one computer where I am installing the programme,
whereby, if someone tries to copy it to another computer, it will not
work? The simpler the better.

For something similar I've used this very simple aproach:
When putting your database on the target computer, you also put a small file
somewhere on that persons computer. Below C:\windows is suggested.
When your database starts, the database check for the existence of that
file.
If the file isn't there the database must have been moved to another
computer and you can act appropriately.

If the secret filename is "xxx.dat" and is placed in "C:\windows" you can
use this in the main forms Load-event (and other places too if you want
multiple checks).

Dim strFile As String
strFile = "C:\windows\xxx.dat"
If Len(Dir(strFile)) > 0 Then
'do nothing because the file is there
Else
MsgBox "The database is not registrered for this computer" & vbCrLf & _
"Please contact Your Name"
'Docmd.DeleteObject acForm, "NameOfYourMainForm" 'uncomment this to
delete the main form
DoCmd.Quit acQuitSaveAll
End If

If you wanna make sure that the one who runs into this (the one who copied
your db) doesn't make a way around it you can do something to destroy the
copied database.
For example a: docmd.deleteobject acform, "NameOfYourMainForm"

and the database will be rendered useless.
I you don't have any password on your vba editor and if your not
distributing and mde someone could find out about this and disable it.

Maybe this could be an idea.


Jesper F, Denmark
 
I agree with Jesper (in principle, if not in detail). A small effort
will deter 99% of the people who want to copy your database. /No
amount/ of extra effort will deter the remaining 1%, so you might as
well not worry about those!

If you use Jesper's approach, use the Windows right-click Properties
box to set the "system" and "hidden" attributes for the file. Then they
probably won't be able to see it in windows explorer. Personally I
would put it in the same directory as the database file - not in the
windows system directory.

The other approach would be to have it check for an entry in the system
registry. See the SaveSettings() and GetSettings() methods for more
information.

None of these methods will stop a reasonably determined person. You can
easily download free programs from the web, which will display all of
the file & registry accesses performed by a program.

HTH,
TC
 
Hi Jesper,

Thank you for spending the time writing out the code and for your very good
suggestions. I appreciate it very much. There is one particular person in
the organisation who is very likely to want to copy my database for their
own needs, and whilst I would not mind if they asked, I am certain they will
attempt to do so without asking me. I am sure that all I need is a clever
deterrent, which is what you have provided me with.

Thanks again
Laura
 
Hi TC,

Thanks also to you for adding your comments and advice. I agree that with a
bit of effort, and knowledge, which this other person has only a small
amount of in Access, they would be able to work out what's going on. I don't
think I will venture into Registry entries, but I like the idea of the
hidden attributes of the 'secret' file.

As I said in my note to Jesper, it is one particular person in the
organisation who is very likely to want a copy of my software and whilst I
would not mind if they asked me, I am fairly certain they will attempt to
take it without asking. I would like to do something to the software which
will just render it unusable to the point that they may then actually come
back to me saying they need a copy and that they have attempted to copy it,
but it will not work.

Thanks again for your help and interest - any other suggestions would be
great, but this should do the trick.
Laura
 
It's always tempting to make the message say something like: "Gotcha!
You tried to copy it illegally! How much of an idiot do you feel like
now, pal ???" But politically, it's probably better to say:
"Installation error 1046. Please contact your software supplier."

Also make sure you are pre-prepaed with a suitable answer to his
question, "Why didn't it work when / I / copied it?".

Cheers,
TC
 
Thanks, I take your point and it's probably best to make it look like a
programming error of some kind - I will prepare a suitable reply. Thanks
again. I should be installing software some time this week.
Laura
 
Hi
I want to implement Jespers sugestion to prevent users making a copy of my
dtabase from the file server upon which it is stored. i want to specify a
relative path (in the line of code: strFile = "C:\windows\xxx.dat") so that
users are unable to open the database even if they just copy it somewhere
else on the same file server.

If my "check" file is called "local.dat" and it lives one directory below
the database itself in "System Files", I thought my line of code would be:

strFile = "\System Files\local.dat"

But this does not work - can anyone help out here please?
Thanks
Mark
 
I want to implement Jespers sugestion to prevent users making a copy of my
dtabase from the file server upon which it is stored. i want to specify a
relative path (in the line of code: strFile = "C:\windows\xxx.dat") so
that
users are unable to open the database even if they just copy it somewhere
else on the same file server.

If my "check" file is called "local.dat" and it lives one directory below
the database itself in "System Files", I thought my line of code would be:

strFile = "\System Files\local.dat"

But this does not work - can anyone help out here please?

Hi Mark,

I think you can use:

strFile = application.currentproject.path & "\System Files\local.dat"

Cheers,
Jesper Fjølner
 
Back
Top