Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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
    Daniel Weiss
    EZ Link Software

    #2
    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.
    There can be only one.

    Comment


      #3
      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

      Comment


        #4
        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

        Comment


          #5
          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
          Daniel Weiss
          EZ Link Software

          Comment


            #6
            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

            Comment


              #7
              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
              [email protected]
              Regards,

              Ira J. Perlow
              Computer Systems Design


              CSDA A5 Products
              New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
              CSDA Barcode Functions

              CSDA Code Utility
              CSDA Screen Capture


              Comment


                #8
                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

                Comment


                  #9
                  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.
                  There can be only one.

                  Comment


                    #10
                    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

                    Comment


                      #11
                      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

                      Comment


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

                        Jerry
                        did you receive my E-mail?
                        Daniel
                        Daniel Weiss
                        EZ Link Software

                        Comment


                          #13
                          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

                          Comment

                          Working...
                          X