The following example compares the version of an installed plug-in to the version located in a container field in the FileMaker Pro file and updates the plug-in, if necessary.
Set Error Capture [On]
Install Plug-In File [Plugin Update::Plug-in File]
#
#Deal with errors
If [Get(LastError) ≠ 0]
If [Get(LastError) = 3]
Show Custom Dialog [Plugin Update::Plugin File & " could not be installed. Ensure Allow Solutions to Install Files is selected in the FileMaker Pro Plug-in preferences."]
Else If [Get(LastError) = 1550]
Show Custom Dialog [Plugin Update::Plugin File & " was installed but could not be initialized."]
Else If [Get(LastError) = 1551]
Show Custom Dialog [Plugin Update::Plugin File & " could not be installed."]
Else
Show Custom Dialog ["A general error " & Get(LastError) & " occured when installing " & Plugin Update::Plugin File]
End If
End If