Alpha Video Training
Results 1 to 13 of 13

Thread: Check if Alpha Full or Run Time version, in use?

  1. #1
    Member
    Real Name
    Daniel Weiss
    Join Date
    May 2000
    Location
    Monsey, NY
    Posts
    506

    Default Check if Alpha Full or Run Time version, in use?

    Is there any way to check using X basic, if the application was opened using the Alpha5 Full version or the Run Time version?

    A5.get_exe_path() only returns the path of the executable file, which could be the same for both versions.

    The Version() function also returns the value for both

    Thank you,
    Daniel Weiss

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Check if Alpha Full or Run Time version, in us

    I assume your full version is for development and the users use the runtime "shadowed" on a netwoprk.

    If you test for A5.get_master_path() "" then this is a shadowed version.

  3. #3
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,312

    Default RE: Check if Alpha Full or Run Time version, in us

    Stan,

    I'm not so sure. I thought get_master_path() simply informs you whether you opened the database on the server directly, or through a shadow copy opened locally. If memory serves, I think you get the same result whether you open the database with the full version or the runtime. If so it probably can't be used to tell a script which version the user is employing.

    -- tom

  4. #4
    Member
    Real Name
    Craig Schumacker
    Join Date
    May 2000
    Posts
    703

    Default RE: Check if Alpha Full or Run Time version, in us



    Daniel:

    Well, it's primititve, but this works for me. I needed to have a script run only on the machines in a network that were running the runtime.

    In my case, with clients, I often customize the folder name for the runtime to something like "McDonaldssoft", or the like, to help avoid accidental deletion during periodic cleanups.

    The Full version, if applicable on the network (almost one copy HAS to be), gets some variant of it's default folder, but it almost always end in 'A5V4' . With that conclusion being enforced on my end, here's what I do:

    dim path_route as c

    path_route = :a5.get_exe_path()

    if right(alltrim(path_route),4) = "a5v4"
    'full version code runs here
    end
    end if
    'Runtime version code runs here
    Craig

  5. #5
    Member
    Real Name
    Daniel Weiss
    Join Date
    May 2000
    Location
    Monsey, NY
    Posts
    506

    Default RE: Check if Alpha Full or Run Time version, in us

    Thanks Stan, Tom and Craig
    What I am trying to accomplish here could be useful for other developers as well. I want to block clients that would purchase a copy of the Alpha Full version so they could try to modify the application. It actually came across to me when I was approached by an employee of one my clients with a fair knowledge in computer background, he asked me if I would give him a copy of the full version so he can play around with the application. I know we can put passwords in the Table Forms Etc design, but we know how easily one could work around it, for this reason I am trying to find a way to Alpha type that the application was opened with, and if it was opened with the full version it would require a password to continue or else close the application.
    We could something like this “if file.exists(:A5.get_exe_path()+"a5dbgwin.exe") =.t.” the “a5dbgwin.exe” doesn’t exist in the run time folder, but I was wondering if there is a better way.

    Daniel Weiss

  6. #6
    Former Alpha Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,173

    Default RE: Check if Alpha Full or Run Time version, in us

    Craig,

    That might work, except that the default directory for the runtime installation is A5V4_Runtime. I think Daniel has the right idea of looking for a unique file in the runtime. If you could come up with a way to check into the registry and look for a license number key, that would only exist if a full version is installed.

    Jerry

  7. #7
    VAR csda1's Avatar
    Real Name
    Ira J Perlow
    Join Date
    Apr 2000
    Location
    Boston, Massachusetts, USA
    Posts
    3,530

    Default RE: Check if Alpha Full or Run Time version, in us

    Daniel,

    I haven't tried this, but what you might try to do is to trap an error that the runtime would create because it could not do something that the full version could do. E.g. I remember that there is an Xbasic line that will open a form for editing. If this can be trapped, then a variable could be set indicating the state.

    Regards,

    Ira J. Perlow
    Computer Systems Design & Associates
    csda@attbi.com

  8. #8
    Member
    Real Name
    Craig Schumacker
    Join Date
    May 2000
    Posts
    703

    Default RE: Check if Alpha Full or Run Time version, in us

    Jerry:

    You said:

    "That might work, except that the default directory for the runtime installation is A5V4_Runtime."

    I think you mean to point out that that's why it will work, as the expression evaluates to "time" when the runtime is placed in it's default folder. ;~)

    Nevertheless, it doesn't solve Daniel's enhanced post.

    Craig

  9. #9
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Check if Alpha Full or Run Time version, in us

    I agree.

    From the original post I assumed he wanted to do/not do something based on whether the user was operating under runtime and that the runtime users "use the runtime "shadowed" on a network."

    So if you use the get_master_path check, assuming this setup, you could tell whether the user was a developer or runtime user.

    Limited functionality in light of the further details provided later.

  10. #10
    Former Alpha Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,173

    Default RE: Check if Alpha Full or Run Time version, in us

    Craig and Daniel,

    Thats what happens when you are in a hurry and don't read the post carefully (and not enough coffee). I thought the expression said left(alltrim(path_route),4) = "a5v4". Your expression is correct.

    However, a little research came up with an interesting idea. Regedit can run in command line to export a registry key. If Alpha5v4 is a full version, it has a registry key

    [HKEY_CURRENT_USERSoftwareAlpha SoftwareAlpha Five 4.0USER]

    This key gives the registration number. A runtime version does not have this key. If both are installed, the key will exist. I found a regedit command line switch which allows exporting an registry value. Attached is a batch file which will try to export this key. I found the file "c:alpha.reg" will be created if the key exists, but will not be created if the key does not exist (runtime only). Therefore, you could set the properties of the batch file to run minimized and close on exit, then use xbasic to run the batch, and then check if the export file exists. If it does, you have a full version loaded.

    I have only tried this on 2 computers. One has just runtime and the other has both runtime and full version. The one with runtime does not create the file and the other does. You can edit the batch file to set the path and name of the export file to whatever.

    Daniel, will this work?

    Jerry

  11. #11
    Member
    Real Name
    Craig Schumacker
    Join Date
    May 2000
    Posts
    703

    Default RE: Check if Alpha Full or Run Time version, in us

    Jerry:

    What d'ja stay up all night working on this? Gee, I like to help people out, but your the limit!

    Nice piece of detective work.

    Let's say I'm a client. My consultant installs the runtime and his app. I now have no 'key' in my registry, and all is well.

    I now, without my consultant's knowledge, install the full version. The key now exists.

    Now the application won't run from either the full version, or the runtime, correct?

    Even if I reinstall the runtime, the app won't run until I uninstall the full version, assuming that the uninstall actually removes the key. Am I right about this?

    I guess that would force me to call and hire the consultant to get me up and running again!!!

    I enjoy this thread, as I see lots of ways to put obstacles in, but, and I won't say how, it's very easy for anyone who knows A5 to bypass all of them. My current theory would be to put in as many obstacles as possible, and hope that it is enough to deter tampering... In most cases, I guess it would be...

    Thanks for the info!

    Craig

  12. #12
    Member
    Real Name
    Daniel Weiss
    Join Date
    May 2000
    Location
    Monsey, NY
    Posts
    506

    Default RE: Check if Alpha Full or Run Time version, in us

    Jerry
    did you receive my E-mail?
    Daniel

  13. #13
    Former Alpha Employee JerryBrightbill's Avatar
    Real Name
    Jerry Brightbill
    Join Date
    Apr 2000
    Posts
    5,173

    Default RE: Check if Alpha Full or Run Time version, in us

    Daniel,

    Got your email. I think any method can be defeated if the user is real determined. Craig put it best,"put in as many obstacles as possible, and hope that it is enough to deter tampering".

    The method I outlined would be somewhat difficult to beat since the registration key is needed to run the full version. If you hard code an xbasic script to delete any existing reg file, build and run the batch file, check for the new file, and then delete the batch and the reg file, there is really nothing for the user to get a grip on, unless they break into your code. Without the full version, that would be difficult. Another issue is how do you open the app for editing later. You would need some special password protected entry method to skip the check script.

    There are some other ideas to make it even more difficult, but there are limits to paranoia. By the way, I wasn't up all night, but it is surprising what you can find in a search of the internet. A simple idea and information can be dangerous.

    Jerry

Similar Threads

  1. Part time or full time Alpha Develoeprs
    By Henry Rothschild in forum Announcements
    Replies: 5
    Last Post: 06-26-2004, 03:08 PM
  2. Seeking part time or full time Alpha Four and/or A
    By Henry Rothschild in forum Alpha Four Version 6 and Prior
    Replies: 0
    Last Post: 06-18-2004, 01:01 AM
  3. Need Full Version Alpha Five V3.1-4
    By ronwills in forum Alpha Five Version 5
    Replies: 7
    Last Post: 09-02-2003, 01:52 PM
  4. Need Full Version Alpha Five V3.1-4
    By ronwills in forum Alpha Five Versions 2 and 3
    Replies: 0
    Last Post: 08-23-2003, 10:15 AM
  5. check out Alpha Five Version 6 Technology Previews
    By Richard Rabins in forum Alpha Five Version 5
    Replies: 7
    Last Post: 04-23-2003, 08:22 AM

Bookmarks

Posting Permissions

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