Link to home
Start Free TrialLog in
Avatar of Jegajothy vythilingam
Jegajothy vythilingamFlag for United States of America

asked on

Access 2007

My OS is windows 7 and I am trying to build a small access app for a friend.  But I just want this app to be used only on one pc, which is the one he has at home.  Is there a way to tie in the code  the IP address of the pc, so that it will not be recycled.  thank u.
Avatar of clarkscott
clarkscott
Flag of United States of America image

You could place a file (perhaps in the System 32 folder) that you specifically look for in order for the application to run.  Title it so it doesn't reflect your application.  For instance "x2gt.dll" or something.

In the startup of the app, look for it.  If it doesn't exist, the program quits.

function CheckForFile()
dim verror as boolean
dim f as long
on error goto NoFile
f = freefile
open "YourPath and file name" for input as #f.
if verror = true then
    '--- can't open the file - it doesn't exist --
    msgbox "Illegal copy",vbcritical
    on error resume next
    close f
    application.quit
end if

progout:
'---- to get here meant the file exists and all is good -----
close f

exit function

NoFile:
 verror = true
 resume next

end Function



Scott C
I have to ask - if this is for a friend, why would you care if it's used on other machines? Just curious, really ...
As you have Acess 2007, you have access to Extensions from which you can build a RunTime app and password protect it.  Tying it to the IP address is not a good idea.  What if he moves?
Avatar of Jegajothy vythilingam

ASKER

In response to LSMConsulting, as it is going to take me lots of time and energy and I have to build it from scratch and since he is running a successful home business and the ability to pay but as usual with humans, they will try to short change u.  He wants me to build it for 4 pcs,but knowing him he will deploy to other pcs when he expands.  Just do not want to be a made a fool.   Thus, the idea to make sure that I hard code the IP address for the 4 pcs.  Any other ideas will be welcome.
ASKER CERTIFIED SOLUTION
Avatar of Armen Stein - Microsoft Access MVP since 2006
Armen Stein - Microsoft Access MVP since 2006
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In response to ArmenStein, I never thought to look at that way.  I was looking at the licenses we buy for our software, where it is for one user one pc.  And I will not be surprised if he resells my application to others, thus the reason to put handcuffs on him.
I agree 100% with Armen.