At some point in time we’ve either faced it or are just discovering it, FileMaker AutoUpdate. You want to use plug-ins but you don’t want to manually install them onto all of your machines. So, you learn and build a little script. Load your plug-ins to the server and test it on your workstation. Everything is fine! Maybe… The newer versions of Mac OS X no longer ship with StuffIt preinstalled.

No biggy, right? Wrong. FileMaker AutoUpdate for Mac requires StuffIt Expander to extract the plug-in file. Because of that, I wrote this little AppleScript you can call from your FileMaker AutoUpdate script, to check if StuffIt is installed.

property stuffit_url : “http://www.stuffit.com/detect_expander.html”
set mySearch to “StuffIt”

set defaultDelim to text item delimiters
set text item delimiters to return
tell application “Finder”
  set myFolders to get name of folders of folder “Applications” of the startup disk as list
  set myFolders to myFolders as string
end tell
set text item delimiters to defaultDelim

if myFolders contains mySearch then
else
  set userResponse to display dialog “Stuffit Expander was not found and is required for properĀ  operation of this application! Please click on Get Stuffit and you will be directed to their website for download.” buttons {”Continue”, “Get StuffIt”} default button {”Get Stuffit”}
  if button returned of userResponse is “Get StuffIt” then
    tell application “Finder”
      open location stuffit_url
    end tell
  end if
end if

The following AppleScript will search through the users Applications folder to see if StuffIt exists. If it’s not found it throws up a dialog alerting the user to download it. I hope this helps in your deployment!