2 Replies Latest reply on Nov 19, 2015 12:24 PM by freppan

    AccessDenied using BE_ExecuteSystemCommand on Filemaker Server




      Stuck and hoping that some brilliant mind(-s) can point me in the right direction.


      I got a script where I create a zpl-stream in a text file and then copy that file to a Zebra label printer using BE_ExecuteSystemCommand. I would like to do it that way so that I can run the script on server using Go or WebDirect.


      This is what I run:

      BE_ExecuteSystemCommand ( "cmd.exe /c copy " & $StreamFileNamePath & " \\\\prtlblkontor64 /b" ; -1 )


      All the time on the same windows machine (the test server): It works great using FMP and also typing it in at the windows command prompt. However when i run it on FMS it returns: "Access is denied. 0 file(s) copied."

      Any suggestions? The shared printer is set on the print server to allow "everyone" to print on it and like I wrote above I can access it using FMP or manually using cmd. It should probably also be mentioned that the test server running FMS is not on the same domain as the print server.


      (I have also tried using BE_CopyFile instead without success.)


      Hope I managed to give all the info needed. Many thanks,


        • 1. Re: AccessDenied using BE_ExecuteSystemCommand on Filemaker Server



          If your FM Server is setup with defaults, the Server service likely runs under the local system account. When you run the command manually, it will be using the account you are logged in with and since it is successful, that account would seem to have the needed privs.


          The one way I know around this is to have the FM server service run under a domain account and ensure that this account has the privs needed to run your various commands. You can set this up in the Windows Services Manager. Locate the FM Server service and in one of the property settings, you can assign the service to run with a specified account. I don't have a Windows server setup in front of me, so I can't say exactly where this setting is.



          • 2. Re: AccessDenied using BE_ExecuteSystemCommand on Filemaker Server



            Thanks a lot for the quick response. Switching the user running FMS to a full admin one and restarting the service did the trick. Should I thought of that myself. Again thanks.