Menno

Not all system-level scripts on FMS14 on windows will run succesfully

Discussion created by Menno on Nov 21, 2015
Latest reply on Jan 15, 2016 by TSGal

Product and version FileMaker Server 14.0.4)

OS and version Windows 2008 R2

Description

A scheduled system-level script is aborted. The FMS-log says:


                    Schedule "xcopysomefiles" aborted; "xcopysomefiles.cmd" could not be found or is invalid.


The script is run as user Administrator who has all rights to all folders on the server and has sufficient rights to the place in the network files are copied from. This works perfectly when run from the scripts-directory within the FMS-installation, either by double-clicking or by running it from the commandline.

How to replicate

The contents of the script are:


                    @echo off

                    xcopy \\SAMBASERVER\Data\SomeFolder\*.* "C:\Program Files\FileMaker\FileMaker Server\Data\Documents\"


Create a schedule in FMS to run a "system-level script" and run under a user with administrative rights. It is also possible to run this script as the default-user (System) but that will result in another error:


                  Schedule "xcopysomefiles" aborted; system script "xcopysomefiles.cmd" returned non-zero status 4.

 

Schedule this to run as an administrator on the system and the result is:

 

                  Schedule "xcopysomefiles" aborted; "xcopysomefiles.cmd" could not be found or is invalid.


Workaround None


Additional Info I also have a system-level script on the same server that run as the default-user and that run perfectly. That script tells the fmsadminconsole to write some data to a logfile:


                   cd "%programfiles%\FileMaker\FileMaker Server\Database Server\"

                   fmsadmin list clients -u admin -p qwerty > ..\Data\Documents\log.txt


so it looks like it has something to do with the contents of a system-level script

Outcomes