Install Plug-In File

Installs or updates a plug-in file from a container field onto your computer.

Options 

Specify target field specifies the container field with the plug-in that you want to install or update. If no field is specified, FileMaker Pro installs the plug-in in the current container field in the active table.

Compatibility 

Product Supported
FileMaker Pro Yes
FileMaker Go No
FileMaker WebDirect Yes
FileMaker Server Yes
FileMaker Cloud Yes
FileMaker Data API Yes
Custom Web Publishing Yes

Originated in version 

12.0

Description 

You must insert the plug-in in a container field before you can install or update the plug-in. See Insert File or Installing plug-ins.

Only FileMaker plug-in files can be installed. If a non-plug-in file is located in the target or active container field, no action takes place when the script runs. The plug-in extension must be .fmx64 (Windows), .fmplugin (macOS), or .fmx (Linux).

Compressed plug-in files in ZIP format or plug-in files in TAR format can't be installed.

You can use the Get(InstalledFMPlugins) function to identify the name, version, and enabled state of an installed plug-in. This function can help you determine whether the installed plug-in is newer or older than the plug-in required by the solution file. See Get(InstalledFMPlugins) or Get(InstalledFMPluginsAsJSON).

Plug-ins must be enabled in the plug-in preferences for FileMaker Pro to recognize them. If the Install Plug-In File script step installs a plug-in update but the plug-in is disabled in the plug-in preferences, FileMaker Pro installs the update but does not enable the plug-in. See Setting plug-in preferences.

For files hosted by FileMaker Server, the server administrator must enable the Install Plug-In File script step in Admin Console. See FileMaker Server Help.

Notes 

  • The system administrator can use the personalization file during an installation on multiple computers to disable plug-ins and prevent plug-in updates from installing in FileMaker Pro. See FileMaker Pro Network Install Setup Guide.

  • This script step is not supported in server-side scripts performed by a FileMaker Cloud host.

Example 1 

Installs the Video plug-in.

Copy
Show Custom Dialog ["Do you want to install the latest version of the Video Plug-In?"]
If [Get ( LastMessageChoice ) = 1]
    Install Plug-In File[Plugins::Video]
End If

Example 2

Installs a plug-in from the appropriate container field based on the operating system and hardware architecture of the system where this script is run.

Copy
Set Variable [ $plugin_json ; Value: Get ( InstalledFMPluginsAsJSON ) ]
Set Variable [ $arch ; Value: JSONGetElement ( $plugin_json ; "environment.architecture" ) ]
Set Variable [ $platform ; Value: GetAsNumber ( JSONGetElement ( $plugin_json ; "environment.platform" ) ) ]

# macOS
If [ $platform = 1 ]
    If [ $arch = "arm64" ]
        # Apple silicon
        Install Plug-In File [ Plugins::macOS_Universal ] 
    Else If [ $arch = "x86_64" and IsEmpty ( Plugins::macOS_Universal ) ]
        # Intel and no Universal plug-in available
        Install Plug-In File [ Plugins::macOS_Intel ] 
    Else
        # Intel and Universal plug-in available
        Install Plug-In File [ Plugins::macOS_Universal ] 
    End If
    Exit Script [ Text Result: "Plug-in for macOS installed" ] 
End If

# Windows
If [ $platform = -2 ]
    Install Plug-In File [ Plugins::Windows_64bit ] 
    Exit Script [ Text Result: "Plug-in for Windows installed" ] 
End If

# Linux
If [ $platform = 5 ]
    If [ PatternCount ( Get ( HostApplicationVersion ) ; "Cloud Server 2" ) > 0 ]
    Else
        Install Plug-In File [ Plugins::Linux ] 
        Exit Script [ Text Result: "Plug-in for Linux installed" ] 
    End If
End If

Show Custom Dialog [ "Plug-ins are not supported on this platform." ]

Example 3 

See Plug-in update example.