1 2 Previous Next 26 Replies Latest reply on Apr 12, 2012 10:21 PM by philmodjunk

    Creating a Runtime Solution Questions

    JCPython

      Title

      Creating a Runtime Solution Questions

      Post

      Ok so with my filemaker database ready to be transformed into a exe runtime, i have several questions.

      I been having a lot of problems using software compilers like inno setup and exeshield, when i used either of these my runtime wouldnt open after...this is why im thinking of distrubuting the runtime without the installer a nice simple way, and i got brian dunnings easy encryption instead of using exeshield...

       

      1.) after the .exe is created can i just give that to my users to use the program, or do i need to include all the folders and additional files filemaker provides with the runtime.

       

      2.) (a)I want to make sure my solution is secure, i dont mean from piracy, but i mean from users opening it up in their filemaker and stealing it, when i make a runtime i usually do the following, create a runtime with exe extention, i leave bindkey alone since i have no clue what to use it for. then i remove admin access from all files (not the main file i use to create the database), and finally i create the error log.

       

      (b) I want to disable the login as guest or admin pop up, but not sure if doing so will be damaging some how to the application? I would like no tool bars what so ever shown, when user opens the runtime i would like to just see it open full screen with nothing else defaulted from filemaker.

      Not sure if possible, but i would like to disable the right click context menu for users but at the same time still allow them the power to use the mouse wheel scroll to navigate records?

      I would like to lock and/or hide the bottom menu bar (the one with zoom in/out and the view modes.

      3.) If i need my runtime to run a script that generates a .txt file and places it someone on the users pc well hidden with data such as exp date of the runtime, or the users nic address to match up with the license key, how would i create the text? and what do you think the best location for such a anti-theft file would be on a windows pc running xp or newer.

       

      4.) after the .exe runtime is created, is there a free not to complicated way that you guys know how to change the icon on the exe from the filemaker folder icon to a custom icon i have.

       

      5.) is there a 3rd party software or a way to determine the compatibility of my runtim of all sorts of windows OS, or is any runtime made with filemaker made to work on all windows and mac OS by default regardless of the scripting?

       

      I realize some of these are stupid questions, i been up all night trying to fix and get things to work in my runtime lol.

       

      6.) I need to create a script that can delete all records in a table here and a table there, but not all tables

       

      7.) I know i had more questions but cant think of them right now, when they come to me later is it better to start a new thread for the questions or continue with this thread?

       

      Thanks so much to everyone on here for all the great help so far!

        • 1. Re: Creating a Runtime Solution Questions
          philmodjunk

          1) you need all the folders and files. Creating a runtime creates both a .exe file and a database file (default extension is .USR) and binds the two to each other. The other files are also needed. The bindkey links the exe file to the usr database file so you need to use it.

          2)

          a) you should definitely remove the admin account from the distributed copy. (Keep it in your developer copy.)

          b) what level of access control do your users need? Will they all access the file at the same level of access? If so you can use FileOptions to specify that the file open with a password you specify automatically entered. You then set up an account for this password with the access privileges you want for your file. Do this in the developer copy. When you want to open it as full access, hold down the shift key while opening the file and you'll get the password log in.

          3) Export field contents can generate the text file, but I'm not sure about where best you should put it. Easiest is to give it a deceptive file name and export it to the same folder as the .usr file where it will be hidden amongst the "clutter" of the other support files. There are get functions that will return the filepath to the location of the exe and usr files--the same place in a runtime so you can put this path in a variable and use it with export field contents to export the text file to that location.

          4) right-click the exe file and select properties. You'll find a method there for altering the file icon.

          5) A script set in File Options to run when the file opens can use get functions to identify the platform. Your exe file will not run on a Mac Os. You will need to create a separate runtime copy for mac on a mac system to get a mac compatible version of your run time. It is possible, if you use identical bind keys, to merge the two run time folders. I think you can just drop the app file from the Mac folder into the windows folder, but could easily be wrong, there might be other files that also need to be copied over.

          6) Go to layout [specify layout for table where you want to delete all records]
               Show all Records
               Delete All Records

              Repeat that for each table.

          7) either works, take your pick.

           

          • 2. Re: Creating a Runtime Solution Questions
            JCPython

            you need all the folders and files. Creating a runtime creates both a .exe file and a database file (default extension is .USR) and binds the two to each other. The other files are also needed. The bindkey links the exe file to the usr database file so you need to use it.

            when you say i need to use it, do you mean i just leave it set at default and thats all or am i suppose to do something with it after the runtime is created?

            b) what level of access control do your users need? Will they all access the file at the same level of access? If so you can use FileOptions to specify that the file open with a password you specify automatically entered. You then set up an account for this password with the access privileges you want for your file. Do this in the developer copy. When you want to open it as full access, hold down the shift key while opening the file and you'll get the password log in.

             

            yes all users will be using the same access control, I will  do that, sounds like a good idea.

             

            3) Export field contents can generate the text file, but I'm not sure about where best you should put it. Easiest is to give it a deceptive file name and export it to the same folder as the .usr file where it will be hidden amongst the "clutter" of the other support files. There are get functions that will return the filepath to the location of the exe and usr files--the same place in a runtime so you can put this path in a variable and use it with export field contents to export the text file to that location.

             

            Very true, as long as i name it some random it will probably never get any notice. can i parse the data from this file after its been "Planted" to make sure the exp date matches the encrypted exp date in the users license key? also when distributing the solution can i enforce that the .USR file is hidden (doing so from the properties of that file on windows), or will this maybe cause a break in the link between the exe and .usr? I just dont want users opening the usr in filemaker.

             

            4) right-click the exe file and select properties. You'll find a method there for altering the file icon.

             

            i thought of that, just wasnt sure if the change of the icon would appear only on my system, or if it will continue to show the custom icon on the distributed copies, would i need to include the .ico file in the program folder when distributing.

             

            5) A script set in File Options to run when the file opens can use get functions to identify the platform. Your exe file will not run on a Mac Os. You will need to create a separate runtime copy for mac on a mac system to get a mac compatible version of your run time. It is possible, if you use identical bind keys, to merge the two run time folders. I think you can just drop the app file from the Mac folder into the windows folder, but could easily be wrong, there might be other files that also need to be copied over.

             

            Oh, i know what my OS is, i meant is there a software or test of some sort to dertermine if my runtime will work on other window OS types, or will i need to just install it on all sorts of dfferent pc's with different OS to find out?

             

             

            6) Go to layout [specify layout for table where you want to delete all records]
                 Show all Records
                 Delete All Records

                Repeat that for each table.

             

            I figured as much, i was just trrying to avoid going through all the needed layouts, but i then realized the script can run through so fast it wouldnt be noticed, plus i realized its a script only for my use to get a database ready for distributation and remove all my sample and testing records while keeping some of the important ones that are needed for the users, so save a copy as [clone] doesnt work well for that.

             

            All very great information! thanks so much :)

            • 3. Re: Creating a Runtime Solution Questions
              philmodjunk

              when you say i need to use it...

              Each user needs the entire folder of files.

              2 b)

              You can use import records to import the contents of the text file into a text field (or fields) and then you can access the contents.

              USR is your database file. No one can use your database without opening this file. It's what your .fp7 file becomes after the binding process is complete.

              5)

              You'll need to test it. Generally speaking, if the run time works with one flavor of Windows it will likely work ok with the others...

              • 4. Re: Creating a Runtime Solution Questions
                JCPython

                Would you know how i could disable the right click context from the manage the custome menus section? and the name of the mouse wheel control i cant seem to find either

                • 5. Re: Creating a Runtime Solution Questions
                  philmodjunk

                  I don't know of a way to do that. Why do you want to?

                  A custom menu change can remove a menu option and this should disable both the keyboard short cut and in the right click menu, but I'm not sure that this is what you had in mind here.

                  • 6. Re: Creating a Runtime Solution Questions
                    JCPython

                    i wanted to remove ALL of the menu options because the add new record option could add a record, when i have a add record button that is scripted to sheck record count first to not allow more then x number records, so i wanted all menu options removed but would like to just keep the function of the mouse wheel scroll, but no big deal.

                    • 7. Re: Creating a Runtime Solution Questions
                      philmodjunk

                      Removing new record from the custom menu should also disable it's short cut and the option in the right-click menu.

                      I don't see where this has any impact on the mouse wheel's function.

                      • 8. Re: Creating a Runtime Solution Questions
                        JCPython

                        Creating a runtime creates both a .exe file and a database file (default extension is .USR) and binds the two to each other. The other files are also needed.

                         

                        am i allowed to use a made up extension instead of .USR, i would like to use .HPR if its not gonna cause issues in performance.

                         

                        Removing new record from the custom menu should also disable it's short cut and the option in the right-click menu.

                        I don't see where this has any impact on the mouse wheel's function.

                         

                        This does make sense, i will give that a shot, Thanks

                        • 9. Re: Creating a Runtime Solution Questions
                          JCPython

                          i created a runtime with a menu set that is just called HPR and its blank, but in the runtime the menu option "Tools" still shows and a few things are inactive but a few things are active and require admin access, only issue i have is with the tools --> data viewer ....if they open this and click the plus sign in the bottom right corner they can then see all my tables and field structure, can this be worked around to remove, or at least hide?

                          • 10. Re: Creating a Runtime Solution Questions
                            philmodjunk

                            .USR is the default extension. You can use other letters--but try not to use one that corresponds with files created by other applications such as .DOC or .PDF. Wink

                            FileMaker Advanced features should not be visible in the Runtime solution. Did you open this file with advanced or double click the .exe runtime application to open the file?

                            • 11. Re: Creating a Runtime Solution Questions
                              philmodjunk

                              You may also want to investigate "Kiosk" mode for your runtime solutions.

                              • 12. Re: Creating a Runtime Solution Questions
                                JCPython

                                well i i opened the HPR file, or the .USR file that the exe is binded to, when that is opened in filemaker the users can then view the tools menu.

                                 

                                I would use kiosk mode but i dont think regular users who would just be opening the runtime every once in a while would like the fullscreen mode, they may not know how to get out of it or something...

                                 

                                I also purchased easy encryption and got it setup, but i dont know how to modify the code so it encrypts and decrypts the nic address, so i tried something different:

                                 

                                added some fields to the encryption table, one is cGetNic (calculation, unsorted) and the other is NicStored (text,auto enter,always validate), when i distribute the runtime, both fields are empty, on startup the cgetnic field retrieves the nic and the nicStored field which is auto enter calculated value of cgetNic, this way when the user tries to share the files with a friend and that person openes it on a his pc, the cgetnic field will be different from the nicStored field.

                                 

                                 

                                i made a script to check if valid registration:

                                if [maste file::cgetnic = maste file::nicStored]

                                else

                                show custome diolog [unregistered!]

                                end if

                                problem is even if i delete the value from nicStored and then run this script it still passes through and doesnt show the diolog. is my script wrong...it looks right to me but wondering if its something so small i cant see it.

                                • 13. Re: Creating a Runtime Solution Questions
                                  philmodjunk

                                  Please open the file by double clicking the .exe file and see what happens.

                                  Seems like you need to test for three things, not two:

                                  1) is the field empty? If so register it by loading an nic value.

                                  2) Is the field not empty and does it match the nic?

                                      Ok go ahead and open

                                  3) Is the field not emapty and the values don't match?

                                       Pop up an error message and quit.

                                  I'd use something like this:

                                  If [IsEmpty ( Master File::NicStored ) ]
                                     Set field [Mater Fiel::NicStored ; Get ( Get(SystemNICAddress) ]
                                  Elise IF [ Master File::NicStored  ≠ Get ( Get(SystemNICAddress) ]
                                      Show Custom Dialog ["This is an unauthorized copy of ..."]
                                      Exit Application
                                  Else
                                      Do what you need to open the file for use by the user here
                                  End If

                                  • 14. Re: Creating a Runtime Solution Questions
                                    philmodjunk

                                    Oh yes, and for those using FileMaker 12, there's a new get function: get ( PersistentID ) that is specifically designed for the purpose of identifying the machine that has opened the database.

                                    1 2 Previous Next