Page 1 of 3 123 LastLast
Results 1 to 15 of 41
  1. #1
    Join Date
    May 2006
    Posts
    386

    Unanswered: Is there anyway For a Database ONLY to run on 1 pc/ntwork with one registration key

    Dear All,
    I was wondering whether is there any way for a database that should ONLY run a computer where they a user should be asked to enter the regisration/product key (which I should be able to create and then give to the user). MOST IMPORTANT OF all either the registration key should only work once and expire after the first use and the user should be allowed to run the database without being asked for the registration key again

    OR

    If someone wants to run the database on a different computer for the first time, then the database should ask the person for the same registration/product key as above.

    Basically somehow I want to stop an authorised people to copy the database and then use it else where. and they should only be able to use it on other computers if they know the registration/product key.

    I wouldnt mind to pay IF someone is willing to help me with this.

    I would really appreciate your kind help.

    Emi-UK
    Love begets Love, Help Begets Help

  2. #2
    Join Date
    Nov 2006
    Posts
    11
    What sort of network are you running this on ?? Would it be possible to setup a group where you add users to that group and allow only these users access to the database in question. This is how access is controlled where I work on our windows xp domain.

  3. #3
    Join Date
    May 2006
    Posts
    386
    Dear Simon,
    thanks for your reply. Basically we run a small network "Small business server" and yes, we do have user names an passwords. But my aim is slightly different in here.
    Suppose I give my database to someone outside our office BUT i don't want him/her to give it to other people so on.

    That is why I want to know whether is it possible that if the database is run FOR THE FIRST time on a computer, the database should ask the person to enter a registration/product key number which should already be saved within the database with codes or else where. Lets say the person doesnt know the registeration key number SO the datbase should not run on that computer.

    If the person knows and enters the registration key, then the database should run and ON next run the database should not ask the user or person for the registration key.

    Like i said, i wouldnt mind paying for this function as long as this works and someone can kindly help me.

    thank you for your cooperation.

    regards
    Emi-UK
    Love begets Love, Help Begets Help

  4. #4
    Join Date
    Feb 2004
    Posts
    137
    You can try creating a function like the following (substitute the highlighted text with the appropriate values):
    Code:
    Public Function RegKeyCheck() As Boolean
    
        Const RegValue As String = "12345-67890"
    
        Dim WshShell As Object
        Dim sRegValue As String
    
        Set WshShell = CreateObject("WScript.Shell")
        If WshShell.RegRead("HKLM\SOFTWARE\MyDb\RegKey") <> RegValue Then
            sRegValue = InputBox("Enter the Registration Key")
            If sRegValue <> RegValue Then
                MsgBox "The registration key you have entered is not valid", _
                    vbExclamation
                Exit Function
            Else
                WshShell.RegWrite "HKLM\SOFTWARE\MyDb\RegKey", sRegValue, "REG_SZ"
                RegKeyCheck = True
            End If
        Else
            RegKeyCheck = True
        End If
    
        Set WshShell = Nothing
    
    End Function
    Make the first line in your database code be a call to this function with something like:
    Code:
    If RegKeyCheck = False then Application.Quit

  5. #5
    Join Date
    Mar 2004
    Location
    UK
    Posts
    82
    there are a few unique ways to do this be using a specific number calculation to obtain your key

    i intend to use this with my app, this will mean that all new users will have to call me to register their software, AND PAY ME A LICENCE FEE!!!!

    andy.flynn@btconnect.com
    Last edited by "L"PLATE; 11-19-06 at 11:51.

  6. #6
    Join Date
    May 2006
    Posts
    386
    Dear L Plate and Matthew,

    Thank you for your times and relpies. L Plate, that is exactly what I want to have in my database. All new users and if the db is installed on a new computer other than the one in whichthe registration key was registered, the person should be asked for a registration/licence key. I WOULD BE REALLY, REALLY GRATEFUL IF YOU COULD PLEAE HELP ME WITH THIS? i WANT TO KNOW HOW CAN i DO THIS AND WHERE DO I NEED TO ENTER THE CODE AND SO ON?

    THANKS, LOOKING FORWARD TO YOUR ASSISTANCE.
    EMI
    Emi-UK
    Love begets Love, Help Begets Help

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ?? how about something trivially simple ?

    it DOES require you to change one constant in your app for each corporation you sell your app to, but it takes 5 seconds to do that and five more to remake the MDE. not much longer than building and sending a licence key!

    at startup, your app grabs the user's current domain (here's one way).

    if currentDomain <> cstLicencedDomain then
    docmd.quit
    endif

    weakness - anyone can steal a copy and install on a standalone PC and fake the domain and run, but it can't be run in a corporate environment since unlawful users can't login to their corporate net with the wrong domain set.

    weakness - the unGodly could edit the constant value in the mde using a hex editor to another domain having the same number of characters. be a little creative and complicate their lives. for example set the constant = hash(domain & something) where the something is some aspect of your application and check if hash(currentDomain & something) <> cstLicencedDomain then

    weakness - clever tools to trace execution will spot what is going on

    suggestion - Win strings stay in memory for an amazingly long time, avoid where possible.

    suggestion - lock that .MDE down as firmly as you know how

    izy
    currently using SS 2008R2

  8. #8
    Join Date
    Nov 2003
    Posts
    1,487
    You know...there are so many ways this sort of thing can be done but be forwarned, none are fool proof. If someone wants to use your application, in time they will. The more effort you put into your application, the more effort will be needed for someone to break your registration scheme. All we can ever hope to do is make it difficult to accomplish.

    Message Izy...he has some good registration samples as I'm sure many other here do as well. I personally use MD5 key generation based from information like Hard Disk serial and volume serial numbers the application was installed on along with other pertinent system specific information.

    good luck.....

    edit...whoops. Izy already posted before me...lol
    .
    Environment:
    Self Taught In ALL Environments.....And It Shows!


  9. #9
    Join Date
    May 2006
    Posts
    386
    Thanks for your reply. The thing is I even dont know any of those possibilities! First of all for some reason, when i want to change the mdb to mde, the Make MDE file option is unavailable (is not on).

    Can you please suggest the best and most complicated one in terms of making it difficult for users who may want to copy and use the db elsewhere. I would really appreciate if you could write the code or send me the sample with the instruction on how and where to place those codes?
    Thanks so much!
    Emi-UK
    Love begets Love, Help Begets Help

  10. #10
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    hi CyberLynx
    for once in my life i typed faster than someone else
    ...but it looks like my reading skills let me down again.
    my first read-through i thought the question was 'lock to one net'
    now i see it is 'lock to one net/machine/user'
    ...clearly first proposal is impractical if you need to issue 1000 different MDE customised to domain/user/machine.

    so you need the next stage in the process:
    user e-mails you
    sha1(domain & something & md5(user & machine)) - call it his userID
    two different hash algos always better than one

    you make some sort of licence number (using rnd for example to come up with the typically ugly stuff from M$
    4RT6k-5gB09-blah blah - call it the 'key'
    you mail the user the key plus something called a 'keycode' which is
    sha1(userID & md5(key))

    user pastes this stuff into a form that saves it in a one-records table

    your startup check is now:
    get the key & keycode from the one-record table
    if sha1(sha1(domain & something & md5(user & machine)) & md5(key)) <> keycode then
    docmd.quit

    as CyberLynx says, you can keep normal people out, but the serious guys in black hats wont have too much of a problem whatever you do.

    izy
    currently using SS 2008R2

  11. #11
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    Make MDE file option is unavailable (is not on).
    get this fixed first!
    what version of A are you in?

    did you see my simple demo? it is not a real-life protection scheme but it shows one possible outline route.

    izy
    currently using SS 2008R2

  12. #12
    Join Date
    May 2006
    Posts
    386
    Hi,
    I am using access version 2002.
    I have looked at the demo you have sent, but to be very honest, I couldnt get my mind over it! I dont know what to do with that?

    My current DB has got quite few forms, queries, reports and 2 modules. Can you please write me the instruction on how to and where to paste these codes (from your demo) so that if the db is installed on a different computer othern than the one , then the user should be asked to enter the license/registeration key.

    I would really be grateful for your kind help.
    Emi-UK
    Love begets Love, Help Begets Help

  13. #13
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ok. here's a suggestion.
    make a new really REALLY simple .MDB and post it here.
    as a minimum it must have one form that you want your users to see when the application starts (and for this exercise it doesn't need anything else at all - one form that you will recognise as being 'your' form is perfect, data is unnecessary).

    BEFORE you post the MDB, please check in File/DatabaseProperties that you are not revealing stuff you don't want to reveal.

    then some homework for you:
    open your real application
    Alt-F11
    and in the resulting code window try a couple of things:

    a/ see if your app compiles:
    menu: Debug/Compile

    b/see if you have crypto & wmi & scripting available:
    menu: Tools/Reference
    and scroll down the list (DONT CHECK/UNCHECK ANYTHING!) to see if you can see four entries:
    CAPICOM blah blah
    Microsoft Scripting Runtime
    WMI blah blah (2 of them)
    if you can't see these four guys (i don't care checked/not since i'm late-binding) then my demo wont run.

    meanwhile:
    i'll wrap your MDB in a simple demo licencing scheme. it will NOT be rocket science, just something simple to get you pointing in one possible direction.
    i will repost your wrapped app, plus sepearate MDB that generates licences for your app.

    i might not get round to this until tomorrow, so be patient.

    izy
    currently using SS 2008R2

  14. #14
    Join Date
    May 2006
    Posts
    386
    Dear Izy,
    THANK YOU SO MUCH FOR YOUR TIME. I have created a simple DB with only one form with nothing in it.
    I have checked the Alt+F11 and it opened the windows with no codes and since there is no code, not all functions within the menu were on.

    I also checked the Tool/References and everything was in the list EXCEPT
    CAPICOM
    which you said.
    Also, I didnt know where to look for
    b/see if you have crypto & wmi & scripting available:
    which you asked for? if they are in the reference list and if they are from those 4 things you asked for, then i only dont have CAPICON.

    Please note that I have only created a new test DB and only created an empty form and nothing else. I dont know whether this what you asked for?

    I would be very grateful for your kind help and ALSO instruction after you work on the db and then let me know what I am supposed to do with that so it works with my existing/real db.
    Once again, thank you so much.
    emi
    Attached Files Attached Files
    Last edited by Emal; 12-10-06 at 16:20.
    Emi-UK
    Love begets Love, Help Begets Help

  15. #15
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    download CAPICOM

    i'll have a look at wrapping your MDB

    izy
    currently using SS 2008R2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •