Guide to Updating Plug-ins

14 FileMaker Server Guide to Updating Plug-ins
FMSAUC_UpdatePlugIn
Format FMSAUC_UpdatePlugIn("plug-in-name version")
Parameters plug-in-name version – the name of the plug-in or support file that you
want to download and the plug-in version number. The parameter must be
enclosed in quotes.
Note There must be a space between the plug-in name and the version number.
Data type returned Text
Description This function downloads the specified plug-in or support file from the server
computer to the client computer. FileMaker Server looks for the plug-in in two
places. First, it searches the AutoUpdate folder located in the same folder that
contains the hosted database. If the file is not found there, it searches for an
AutoUpdate folder located in the FileMaker Server default database folder.
Example FMS_UpdatePlugIn("SamplePlugIn 1.5").
If there is a file with the same name in the current user’s FileMaker Extensions
folder, it is moved to the Extensions\Saved folder. If this file is a plug-in, it is
disabled in FileMaker Pro before it is moved. The newly downloaded file is then
copied to the current user’s FileMaker Extensions folder and enabled, if the
downloaded file is a plug-in.
If the file successfully downloads, the function returns 0 (zero). Otherwise, the
function returns an error code listed in the following table.
If an error occurs during the downloading process, the FMSAUC_UpdatePlugIn function attempts to restore
all files to the state they were in when the function call executed. If an existing plug-in was disabled and
moved to the Extensions\Saved folder, it is moved back to the current user’s FileMaker Extensions folder
and re-enabled in FileMaker Pro on the client computer.
Error code Description
–1 The file to be downloaded is missing from the temporary folder
–2 The Extensions\Saved folder to contain the backup of the outdated plug-in or support file couldn’t be created
on the client computer
–3 The file to be replaced on the client computer couldn’t be deleted from the current user’s FileMaker Extensions
folder
–4 The file to be replaced couldn’t be moved to the Extensions\Saved folder
–5 The downloaded file can’t be copied to the current user’s FileMaker Extensions folder
–6 The download file must be a plug-in file
3 The Auto Update plug-in is disabled in the FileMaker Server Admin Console.
5 The download file can’t be found in the AutoUpdate folder on the FileMaker Server computer
6 An error occurred on the computer running FileMaker Server as the file was being downloaded
100 The external function definition for FMSAUC_UpdatePlugIn contains an invalid or empty parameter
101 The function call from the client computer to the computer running FileMaker Server failed. The server
computer might be running a previous version of FileMaker Server.