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

practical use of a5.Get_Exe_Path()

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

    practical use of a5.Get_Exe_Path()

    Could anyone enlighten me on how I would start my A5V11 application (BHS) with the following line customized to use the Alpha5.exe after finding it with A5.Get_Exe_Path?

    "C:\Program Files (x86)\A5v11\alpha5.exe" "C:\BHS\BHS.ADB"' -title="Balanced Health System" -splash="C:\BHS\logotinygreen.bmp" -icon="C:\BHS\logo.ico"

    My thoughts are to create a simple application to start BHS which finds Alpha5.exe and then runs the line replacing
    "C:\Program Files (x86)\A5v11\alpha5.exe" with a variable. Two challenges; the syntax to use (eval.. perhaps??) and
    two, close the startup application and leave the BHS open.

    I am thinking that my thinking is stinking but I still have a real need to know where Alpha5.exe is installed without the user having to do it.

    Thanks,

    Gene

    #2
    Re: practical use of a5.Get_Exe_Path()

    Is your 'startup application' another Alpha application? Or are you just trying to get a shortcut to the BHS app?
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

    Comment


      #3
      Re: practical use of a5.Get_Exe_Path()

      for at least a portion of that, look here?
      http://www.alphasoftware.com/alphafo...-run-alpha-app
      Dave Mason
      [email protected]
      Skype is dave.mason46

      Comment


        #4
        Re: practical use of a5.Get_Exe_Path()

        Ultimately starting BHS. I already do that by just "shortcutting" to BHS.ADB but that is not a good way to go. What I am trying to determine is the front part of the proper startup line through the use of a5.get_exe_path. Getting the info is what a5.get_exe_path does but how to make use of the result is the question.

        Comment


          #5
          Re: practical use of a5.Get_Exe_Path()

          Thanks Dave,

          Looking through that tells me that the need for the location of the runtime is still there. What I am thinking is of a way to use the result of the a5.Get_exe_path command in the startup line. One more question that may help me to help all get there is ...

          Can you create a script by reading the contents of a text file that looks like a script using xbasic?

          I can easily create a script in notepad or whatever then use cut and paste to put it into a script. That's a no-brainer. I could also create a script to create a text file based on the result of A5.Get_Exe_Path. The text file would contain nothing more than the "proper" startup line. If I copy the content of the text file into another script (BHS_Startup) using xbasic, I think I could come up with a way to address my need.

          Wishful thinking?

          Gene

          Comment


            #6
            Re: practical use of a5.Get_Exe_Path()

            I guess I do not understand why you are trying to make this complicated or maybe I am not understanding just what you are trying to do.

            For my apps, I have the installer create a desktop shortcut with the correct info to start Alpha5 and then load my app.

            In the Target I have C:\SCS\system\Alpha5.exe "C:\T-Six\TSix.adb" -INCLUDE="C:\T-Six\SC.startup"
            If the Start in I have C:\T-Six
            And for the Icon I have C:\T-Six\T-Six.ico

            Now in the installer the target file is <SystemDrive>\SCS\system\Alpha.exe (this is where I always have the runtime installed)
            The Parameters are "<InstallDir>\TSix.adb" -INCLUDE="<InstallDir>\SC.startup" (<InstallDir> is where the users wants the app installed)
            The Working Dir is <InstallDir>
            And the Icon is <InstallDir>\T-Six.ico

            The result is the user can install my app on any drive they want and the desktop shortcut will be setup to start Aplha5 and load the app.

            Comment


              #7
              Re: practical use of a5.Get_Exe_Path()

              You could try a batch file like this:

              @ECHO OFF
              START /MIN C:\A5v11\alpha5.exe -INCLUDE="C:\A5V11\PR\SKK\PR_LOCAL.TXT"
              EXIT
              Robin

              Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

              Comment


                #8
                Re: practical use of a5.Get_Exe_Path()


                In the Target I have C:\SCS\system\Alpha5.exe "C:\T-Six\TSix.adb" -INCLUDE="C:\T-Six\SC.startup"
                If the Start in I have C:\T-Six
                And for the Icon I have C:\T-Six\T-Six.ico

                Now in the installer the target file is <SystemDrive>\SCS\system\Alpha.exe (this is where I always have the runtime installed)
                The Parameters are "<InstallDir>\TSix.adb" -INCLUDE="<InstallDir>\SC.startup" (<InstallDir> is where the users wants the app installed)
                The Working Dir is <InstallDir>
                And the Icon is <InstallDir>\T-Six.ico
                I simplify this a bit by creating and exe like(for you) scs.exe just simple and sweet. It has the icon imbedded, and calls the icon for alpha to use as well.
                All startup parameters are inside the scs.exe.
                This one will give an idea:

                Private Sub Form_Load()
                Dim exepath
                Dim upspath
                exepath = "C:\alda"
                upspath = exepath + "\alda.exe"
                upspath = upspath + CurDir + "upslogv11"
                upspath = upspath + "\sales.adb " + "-INCLUDE -TITLE=UpsLog 11.2 by ALDA Consulting 352-302-2015"
                upspath = upspath + " -ICON=" + CurDir + "\upslog.ico"
                upspath = upspath + " -NOSYSMENU"
                c = Shell(upspath, 3)
                End
                End Sub
                Once compiled it is usbesk.exe. Icon is embedded as well.

                All of my runtimes are in c:\alda12\appfolder alda12 matches V12 and appfolder is name according to the app,
                Dave Mason
                [email protected]
                Skype is dave.mason46

                Comment


                  #9
                  Re: practical use of a5.Get_Exe_Path()

                  Hi Dave,

                  I tried your scenario. I put all the runtime files in a subdirectory below my application and created an install. After running the install, runtime could not find various files. They were all there in the runtime directory. I removed my application and runtime from my laptop and tried scenario B; install runtime (which does not provide the option to choose its' location), then install my application. I then put the call line into the shortcut ("C:\Program Files (x86)\a5V11\alpha5.exe" "C:\Balanced Health\BHS.ADB" -include=C:\Balanced Health\System\startup.txt"). It works fine.

                  My observation is that if the install is done on an XP machine or before, yes, there are those still out there, then runtime will end up under the Program Files... directory. If Vista (God help those with that!) or later, its under the (x86) directory. This is why I want to be able to determine which place Runtime ends up and provide the appropriate shortcut for the user.

                  Gene

                  Comment


                    #10
                    Re: practical use of a5.Get_Exe_Path()

                    Thanks Robin.

                    I think I will do just that. I still need to be able to determine which of the two possible locations runtime is in to use the proper startup line.
                    The runtime install does not allow choosing where to put it.

                    Any suggestions as to how to do that within the batch file?

                    Thanks,

                    Gene

                    Comment


                      #11
                      Re: practical use of a5.Get_Exe_Path()

                      The runtime install DOES allow you to install to any folder.
                      You can do that during the beginning of the install or as a line command.
                      Dave Mason
                      [email protected]
                      Skype is dave.mason46

                      Comment


                        #12
                        Re: practical use of a5.Get_Exe_Path()

                        It's not clear to me whether you are trying to start one A5 app from another A5 app (which was what I thought when reading your first post) or trying to install an A5 app after the A5 runtime has been installed - which is what I'm thinking after reading the later posts.

                        If you are starting one app from another app, of course the A5.Get_Exe_Path() command will tell you where A5 is but it won't tell you where the other application files are. That would be a completely separate issue.

                        If you are doing an initial install, a good third party installer should be able to read the registry. In that case, I think you can just tell it to look for HKey_Current_User\Software\Alpha Software\Alpha Five 11.0\RTExeLocation and use the value in that location as the path to the runtime. There is one caveat here - I'm not certain whether or not the runtime needs to run once before that registry value will exist. I'll leave that up to you or someone else to verify.

                        My personal preference is to use a third party installer and have the installer install both the runtime and the application with the application in a subfolder under the runtime. This way the installer can be set up to create the correct shortcut in the first place. I do NOT recommend installing the runtime in any Program Files folder - especially since I'm putting the application under the exe folder! Since my company name is AIMS DataCom, my default is to install the runtime to C:\AIMS_DC but I allow the user to install to any folder or drive. (I also remove a lot of the runtime files when I do that because, for example, my apps seldom use any of the 3800+ files in the css folder and I don't want to waste the user's time and computer space installing them. In most cases I just install the main runtime files, the Themes folder, the AmyUni folder, and the FunctionHelp folder. I'm not sure why anymore and it doesn't make any sense to me but I recall having a problem if I didn't install the FunctionHelp folder. Of course, if you are using any specific StyleSheet Bitmaps, CSS files, etc. then those would need to be included in your installation - but only those you are using; not all 3800+ bitmaps.)

                        Once I have my "install" installer working correctly, I then create an "update" installer that simply doesn't install the runtime and doesn't overwrite any of the data files (.dbf, .cdx, and .fpt). By putting empty data files (or at least no user data) in the update routine and setting them to "Do Not Overwrite", users can "restore" a missing file if necessary (of course, they wouldn't have any data so this would only be an emergency solution if they don't have a proper backup) and, far more importantly, I can easily add new tables when needed for a new feature as part an update without worrying that someone will overwrite existing data.

                        As I re-read the above, I realized that I need to clarify some issues regarding registry entries:

                        My "install" installer initially tries to get the runtime location from the registry. If it finds that, then it installs to that location. If not, then it installs to the default folder I've selected or whatever folder the user selects.

                        My "update" installer doesn't install the runtime so it only needs to know where the app is. Consequently, it looks for a registry value that I set every time the autoexec runs. That way it will always be up to date even if the user moves the app. (Most users don't move the app but I had one that knew enough about A5 and did.) And the time to update it isn't much of an issue since my check showed that it took about 0.000 milliseconds - i.e., the time wasn't even enough to register. I call this registry value my "DataPath" and I store it in the registry under HKey_Current_User\Software\<MyCompanyName>\<MyAppName>\DataPath. If this registry entry does NOT exist then the installer shows a warning about that and shuts down. To create this value in the registry, my autoexec has the following commands that can be copied to any app - although you'll probably want to change the company name:
                        Code:
                        IF a5.get_master_path() <> ""	'Shadowed
                        	datapath = a5.Get_Master_Path() + chr(92)
                        ELSE	'Not shadowed
                        	datapath = a5.Get_Path() + chr(92)
                        END IF
                        adbname = file.filename_parse( a5.Get_Name(), "N" )
                        Registry.sys_create( "HKEY_CURRENT_USER\Software\AIMS DataCom\\" + adbname + "\DataPath", datapath )
                        Note that I used Registry.sys_create(). DO NOT use Registry.sys_set() because that command only updates existing registry values - it will not create a new one. However, sys_create() will create a new registry value or overwrite (a.k.a. "update") an existing one.

                        Note also that this "datapath" points to the server if there is one. This means that you can run an application update from any workstation. I had one customer who had his server in a locked closet so this worked really well for me when he wasn't around to unlock the closet. (Yes, his employees had messed with his server once too often and he decided to put a stop to it.) Of course, each workstation will have to update after the server is updated but that can be handled with either a manual or automatic update based on however you set up the application.

                        Comment

                        Working...
                        X