6 Replies Latest reply on May 16, 2011 3:28 PM by RestaurantCharlie

    Forcing Runtime document to use Runtime Application

    braxton

      Title

      Forcing Runtime document to use Runtime Application

      Post

      I'm using Filemaker Pro Advanced 9 on a Mac. 

      I created a runtime solution on one computer.  I opened the runtime document on another computer and instead of opening the document in the runtime solution it opened up in Filemaker.  I would like to force and limit the runtime document to open only in the runtime application.  I just want to make it a little harder for someone who has Filemaker to easily modify or use my work as their own.

      I am sure this has been discussed before but couldn't find anything on the forum.  Thanks for any ideas you may have.

        • 1. Re: Forcing Runtime document to use Runtime Application
          RestaurantCharlie

          You can add an IF to your start up script using the Get(ApplicationVersion) function. If it doesn't return Runtime version, have the script close the file or exit the application with or without a message to the user, you choose.

          I have a list of authorized computers on which my solution can be accessed from. The start up script checks to see if the NICaddress from the computer matches an authorized computer from that table, if so it passes on. If not, it sends me an email giving me the Comptuer someone is trying to access it from and gives users a chance to enter a text explaining what computer they are on and why they need access from there.

          • 3. Re: Forcing Runtime document to use Runtime Application
            RestaurantCharlie

            * Forgot to add a caveat. You probably picked it up anyway, but for any other readers that check this thread.

            In this case where you want a certain behavior for other users from a developers standpoint, you probably want to leave yourself a backdoor. If you open the file with FMPA you can use the scriptdebugger to exit the script before it boots you out, but from FMP it wouldn't be possible. So in the startup script, I have an IF to check if the user is me, if it does, it doesn't apply the tests, if not it does. This can be done, with accountname privilege set, etc...

            • 4. Re: Forcing Runtime document to use Runtime Application
              philmodjunk

              And if you strip out the admin account from the copy you distribute (keep it in your development copy), you'll make this "back door" difficult for others to use...

              • 5. Re: Forcing Runtime document to use Runtime Application
                braxton

                Thanks guys.

                I caught on to that I might lock myself out.  So, I made a copy of my file before setting the start up script. 

                Nice to know there is a work around if I messed up.

                Also, I only have guest with full privileges.

                Here is my start up script:
                --------------------
                •If [LeftWords(Get(ApplicationVersion);1) = "Runtime"]
                •Else
                    •Freeze Window
                    •Show Custome Dialog ["Application Error";.....      Option:  Ok
                    •Exit Application
                •End If
                •Go to Layout ["Program Form"]...
                  
                ---------------------
                I am trying to make it look like an error instead of a security feature if someone opens it up in FMP. 
                I would rather the file not open at all and just the custom dialog pops up.  However, if I close the
                window after "Else" then the dialog cannot come up.  Freezing it as I have above yields a white screen
                which I can live with.  Anyway, to get the window to close and only have the dialog pop up?

                • 6. Re: Forcing Runtime document to use Runtime Application
                  RestaurantCharlie

                  You can add a Window Script Step to minimize the window, then have the pop up dialog and after that exit the application.

                  You can also add a step to send you an email with the computer name, user name and NICaddress, or other usefull information so you know where they are trying to open your solution.

                  I would definitely build in the back door...