Skip to main content

FileMaker provides a build script and assisted install file to make a JAMF ready installer. I have successfully packaged previous versions which included a license key in the assisted install answer file. 18 now uses a certificate file to activate, and even though the instructions say to include it in the packaging folder, the resulting package still only installs a trial/inactivated version. Has anybody had any luck?

It does not work for me either. The Kbase for the AI of Filemaker 18 is poorly copy-pasted from previous version (for exemple the Registration.app is irrelevant).



It seems that it is necessary to indicate where the license certificate is located using a variable.



But I haven't had any success so far (and the FM forums are in maintenance).



Edit :
The script : AppleRemoteDesktopDeployment.sh does NOT include the LicenseCert.fmcert file. I edited the script and added :



echo 'if [ -e "$TARGET_LOCATION/LicenseCert.fmcert" ]' >> "${postinstall}"
echo 'then' >> "${postinstall}"
echo 'rm -dfR "$TARGET_LOCATION/LicenseCert.fmcert"' >> "${postinstall}"
echo 'fi' >> "${postinstall}"



The PKG is built OK, but its not registering the Application. I think the Assisted Install.txt should mention the Cert file but I have not clue which argument to use…



still digging


Whew! I thought I was the only one experiencing this issue. I'm still learning Jamf and thought I was doing something wrong.


Still struggling with this... Oy!


It looks like this article is the missing link: https://support.filemaker.com/s/article/Installing-FileMaker-Server-with-a-License-Certificate?language=en_US



NOTE: In addition to the Downloads folder, the installer will also look for the License Certificate in the following locations:

The same directory as the installer (the .pkg file for macOS; the .msi file for Windows).
[installdir]/FileMaker Server/CStore/LicenseFile
You can also specify the location of the License Certificate in the Assisted Install.txt file using the parameter: License Certificate Path=

For example,

macOS: License Certificate Path=/Users/johndoe/Desktop/LicenseCert.fmcert
Windows: License Certificate Path=C:UsersjohndoeDesktopLicenseCert.fmcert

@hrhnick Did that actually work for you to deploy the FM client (not Server)?



What's strange is that I was able to package and deploy the app by making sure I have the: installer, "Assisted Install.txt" and the fmcert file in the same folder when installing. On a computer that's never had FM installed, it seems to install fine. However when I try to push it via Jamf Pro, sometimes I get mixed results. The fix usually seems to be delete the FM 18 folder and re-install.



EDIT: https://community.filemaker.com/en/s/feed/0D50H00006o3wwVSAQ


Ok, it seems that the script provided doesn't work anymore for the v18 and the cert file.



They provided me with a new shell script.
[edit : confirmed working here]



!/bin/sh



#################################################################


#################################################################


### Copyright FileMaker, Inc. 2012



Purpose: Create a PackageMaker installer package suitable for mass



deploying FileMaker Pro via Apple Remote Desktop.



Usage:



sudo chmod +x ./AppleRemoteDesktopDeployment.sh



./AppleRemoteDesktopDeployment.sh "<folder 1>"



Make it an executable script by changing the permissions



of the script via chmod.



Where "<folder 1>" contains the original FileMaker Pro



or FileMaker Pro Advanced installer along with the



Assisted Install.txt file.



Required:



1. The command line tool pkgbuild is required. pkgbuild



is available by default on OS X Systems 10.7 and greater.



For Systems 10.6.x, pkgbuild can be installed on the



System by installing XCode available from Apple, Inc.



2. A folder, ie. "<folder 1>" containing a FileMaker Pro or



FileMaker Pro Advanced installer; and containing an



Assisted Install.txt file.



3. The Assisted Install.txt file should contain a username



and license key. The other Assisted Install.txt options,



such as AI_DISABLEPLUGINS, etc., should be set as needed.



Output: The output of this script is an installer package named



"* ARD.pkg", placed in "<folder 1>", that is suitable for



mass deploying FileMaker Pro via Apple Remote Desktop.



#################################################################


#################################################################


root=$1



if [ -d "$root" ] ; then
AppleRemoteDesktopRoot=$root/AppleRemoteDesktopPackage
scriptsFolder=$AppleRemoteDesktopRoot/Scripts
postinstall=$scriptsFolder/postinstall
installLocation=/tmp/fmp_kNENYefmxh



pushd "${root}"
installerPackage=ls *.pkg
popd



installerPackageWithoutSpaces=echo "${installerPackage}" | sed -e s/ //g
installerPackageWithoutFileExtension=echo "${installerPackage}" | sed -e s/.pkg//g



identifier=com.filemaker.ardwrapper.$installerPackageWithoutSpaces



CreatePostInstallScript(){
echo '#!/bin/sh' > "${postinstall}"



echo 'PACKAGE_PATH=${1}' >> "${postinstall}"
echo 'TARGET_LOCATION=${2}' >> "${postinstall}"



echo 'if [ -e "$TARGET_LOCATION/'${installerPackage}'" ]' >> "${postinstall}"
echo 'then' >> "${postinstall}"
echo 'installer -package "$TARGET_LOCATION/'${installerPackage}'" -target /' >> "${postinstall}"
echo 'fi' >> "${postinstall}"



echo 'if [ -e "$TARGET_LOCATION" ]' >> "${postinstall}"
echo 'then' >> "${postinstall}"
echo 'rm -dfR "$TARGET_LOCATION"' >> "${postinstall}"
echo 'fi' >> "${postinstall}"
}



mkdir -p "${AppleRemoteDesktopRoot}" "${scriptsFolder}"
CreatePostInstallScript
chmod +x "${postinstall}"
cp "${root}/${installerPackage}" "${AppleRemoteDesktopRoot}/${installerPackage}"
cp "${root}/Assisted Install.txt" "${AppleRemoteDesktopRoot}/Assisted Install.txt"
cp "${root}/LicenseCert.fmcert" "${AppleRemoteDesktopRoot}/LicenseCert.fmcert"
pkgbuild --identifier $identifier --scripts "${scriptsFolder}" --install-location $installLocation --root "${AppleRemoteDesktopRoot}" "${root}/${installerPackageWithoutFileExtension} ARD.pkg"
rm -dfR "${AppleRemoteDesktopRoot}"
else
echo
echo Usage: ./AppleRemoteDesktopDeployment.sh "<folder 1>"
echo
echo Where "<folder 1>" contains the original FileMaker Pro
echo or FileMaker Pro Advanced installer along with the
echo Assisted Install.txt file.
echo
fi


@hepvd - can you please provide this script in a github gist or something so that it is easier to refer to?


Hi there folks.



In lieu of a reply, I put up a gist: https://gist.github.com/nzmacgeek/9ac977ee58ab01fd00bb2a1398e3236f


You can also just use the code marker (it looks like >_ ) to make code format properly. Otherwise, it interprets the hash character as a formatting mark.



# this is code


this is not code, but it had one hash character in front, which changed the formatting and the hash character doesn't show.


I was able to get package to work with the last shared script and instructions.


z


z


I have been working on this too and here's what I did. I'm still doing testing, but this may work for everyone.



I installed FileMaker 18 on a Mac VM that I use to build packages. I used Composer to capture the license data that is stored at: /Users/Shared/FileMaker/FileMaker Pro Advanced/18.0. I packaged the files into a DMG with the option to fill user home directories. The fill user home directories option may not have been needed since the files are not in the user home, but I did it anyway since I noticed that these files are owned by the user who installed FileMaker.



I created three policies in Jamf Pro. The first is a policy called "Install FileMaker 18" that simply runs the FileMaker installer package on the target Mac. I set the trigger to custom and entered "install-fm18" as my custom event. I scoped the policy to all computers, and set it to ongoing frequency. The second policy is called "Install FileMaker 18 License" that deploys the license files to /Users/Shared/FileMaker/FileMaker Pro Advanced/18.0. I set this one to also use a custom trigger, "install-fm18lic". I then went back to the first policy, and entered "jamf policy -event installfm18lic" in the execute command field in Files and Processes. When Install FileMaker 18 runs, it installs the FileMaker 18 installer package, and then runs the custom trigger that installs the license files. The third policy is called "FileMaker 18". This is the policy that is displayed in Self Service. It is scoped to all computers. It has the dock item for FileMaker 18 included, and it is set to ongoing frequency. Under Files and Processes, I entered "jamf policy -event install-fm18".



When I ran the first install manually, I took note that the license files are owned by the user account that I used to run the FileMaker installer and install the license cert. This is what gave me the idea to package up the license files using the fill user home directory option. When I run the self service policy from a different Mac, and then launch FileMaker, it's licensed. I also saw that when go to the FileMaker Pro Advanced menu in FileMaker, and select About FileMaker, I can see the name associated with the user account under Info. I have ran the Self Service policy twice with the same results. I have not yet performed the installation as an automatic install.



Let me know if this works for you too!


After some experimenting, I have found the easiest way to deploy FileMaker 18 with a license certificate is to simply create a zip file with the following 3 files:




  1. FileMaker Pro 18 Advanced.pkg (the .pkg copied from the installer dmg)

  2. LicenseCert.fmcert (the license certificate copied from the installer dmg)

  3. Assisted Install.txt (copied from installer dmg, edited)



Edit Assisted Install.txt with



AI_LICENSEKEY=LicenseCert.fmcert


Drop this .zip file in Jamf Admin, create policy as usual.



I hope this is helpful! It should save a lot of time with the scripts mentioned in this thread.


I actually have a support case opened with FileMaker. For what it's worth, we are a volume license customer. That means we have more than 5 licenses. I'm not entirely sure. Anyways, here's my last response to them that may provide others with some insight (especially if you want to reproduce the issue and get FileMaker to resolve these issues).





There's a bit more information I wanted to add to this case. This actually goes back to the original issue which I thought we may have resolved but it doesn't look like that's the case. If you need me to put in a separate support case for this let me know.



There are essentially 3 issues that I'm running into at the moment:




  1. Installer fails to properly license FileMaker Pro Advanced 18 despite the license cert being in the appropriate folder.

  2. EULA prompt appears on first run despite being disabled in Assisted Install.txt.

  3. Plug-ins cannot be installed.



From where we left off, I believe the team of engineers looking at this issue is investigating issue #2, but I'd like for them to also look at the other issues as well. The steps to reproduce that are just using the Assisted Install.txt that I've previously supplied via email but I'll re-include here just for the sake of documentation



Steps taken to generate reproduce the 3 issues:




  1. Copy the Assisted Install.txt file from the FileMaker 18 DMG download and modify the following two properties:
    1a. Change the property to "AI_DISABLEVERSIONNOTIFY=1" (causes issue 3)
    1b. Change the property to "AI_LICENSE_ACCEPTED=1" (causes issue 2)

  2. Generate an installer package using the deployment script on your website: https://www.filemaker.com/support/product/docs/fmp_osx_deployment.zip
    2a. Include the full FMPA 18 installer along with the license cert file and Assisted Install.txt file.



Go to your test device and follow the steps below:




  1. Copy the installer to /Users/Shared

  2. Copy the attached launch daemon plist to /Library/LaunchDaemons/

  3. Confirm that the plist has ownership set to root:wheel and permissions are 644. You can do this by running the commands:
    chown root:wheel /Library/LaunchDaemons/com.test.fmpainstall.plist
    chmod 644 /Library/LaunchDaemons/com.test.fmpainstall.plist

  4. Make sure you are logged into a user with admin access.

  5. Open up Terminal and run the following command to load the launchdaemon plist:
    sudo launchctl load /Library/LaunchDaemons/com.test.fmpainstall.plist

  6. To see the process in the background, open up Terminal and run the following command:
    sudo launchctl load /Library/LaunchDaemons/com.test.fmpainstall.plist
    Note: If you did this right then you should see a process in the background running the daemon. To see the process id (first column) and exit code (second column) run the command:
    sudo launchctl list | grep "com.test"

  7. Check out the install.log by going to /var/log/install.log and also see the installer log output from the daemon in /Users/Shared/installer.log



You can try to open FileMaker Pro and at this point you should see in this specific order the following prompts:
1. EULA has not been accepted:

2. FileMaker Pro Advanced 18 has not been licensed:

3. Plug-ins have been disabled.

Note: Just so you're aware if you either 1) remove that property from the txt file or 2) change it to "AI_DISABLEVERSIONNOTIFY=0, then I do NOT run into the error with the Plug-ins tab.



Other things to note that I want to bring to your attention about the installer:
I've been looking at the postinstall scripts inside the FileMaker installer package. I noticed that in the Resources area of the package there's a script located in ./fmpa18Application.pkg/Scripts/postinstall



In this shell script, there are references to "~" in certain paths which is not considered best practice especially in an enterprise environment. "~" is commonly used in shell scripts to represent the home directory path. However this assumes that there is a logged in user. Many enterprise tools install Apple installer packages with no user logged in and/or run as root. Regardless of whether a user is logged in or not this means:




  • if no user is logged in then "~" will not expand to an existing path other than root's home path, and

  • if a user is logged in then it means the path will evaluate to the account running the installer (which is almost never the logged in user and most likely root).



I would recommend that this be addressed as it clearly certain preferences are not being written to the correct user home folder and may lead to other issues in the shell script.



I am checking the install.log as well to see if anything stands out and I am noticing 2 errors that may be of interest to the engineers looking at this issue:




  1. There's a bunch of output similar to "The domain/default pair of (/var/root/Library/Preferences/.GlobalPreferences, AppleLocale) does not exist". This is related to the problem I described above regarding the use of "~".


  2. There's the following error which seems to indicate the binary ApplicationPostFlight is running into some error when attempting to license:



    PackageKit: Executing script "./postinstall" in /private/tmp/PKInstallSandbox.lhireA/Scripts/com.filemaker.FMPA18Application.pkg.C2yFHZ
    ./postinstall: 2019-09-25 08:46:47.054 ApplicationPostFlight[7921:45648] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
    ./postinstall: *** First throw call stack:
    ./postinstall: (
    ./postinstall: 0 CoreFoundation 0x00007fff525c7cf9 __exceptionPreprocess + 256
    ./postinstall: 1 libobjc.A.dylib 0x00007fff7d157a17 objc_exception_throw + 48
    ./postinstall: 2 CoreFoundation 0x00007fff525c7b2b +[NSException raise:format:] + 201
    ./postinstall: 3 Foundation 0x00007fff5477f329 -[NSURL(NSURL) initFileURLWithPath:] + 129
    ./postinstall: 4 Foundation 0x00007fff5477f248 +[NSURL(NSURL) fileURLWithPath:] + 95
    ./postinstall: 5 ApplicationPostFlight 0x000000010ed1e45f -[LicenseCertificateManager init:productName:productVersion:] + 235
    ./postinstall: 6 ApplicationPostFlight 0x000000010ed1c97c main + 140
    ./postinstall: 7 ApplicationPostFlight 0x000000010ed1a034 start + 52
    ./postinstall: )
    ./postinstall: libc++abi.dylib: terminating with uncaught exception of type NSException
    ./postinstall: /tmp/PKInstallSandbox.lhireA/Scripts/com.filemaker.FMPA18Application.pkg.C2yFHZ/postinstall: line 141: 7921 Abort trap: 6 "$SCRIPTS_FOLDER/ApplicationPostFlight" "$PACKAGE_FOLDER/Assisted Install.txt" "${pInfoPath}" "${PRODUCT_BUNDLE}"
    ./postinstall: 2019-09-25 08:46:47.200 ApplicationPostFlight[7943:45779] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
    ./postinstall: *** First throw call stack:
    ./postinstall: (
    ./postinstall: 0 CoreFoundation 0x00007fff525c7cf9 __exceptionPreprocess + 256
    ./postinstall: 1 libobjc.A.dylib 0x00007fff7d157a17 objc_exception_throw + 48
    ./postinstall: 2 CoreFoundation 0x00007fff525c7b2b +[NSException raise:format:] + 201
    ./postinstall: 3 Foundation 0x00007fff5477f329 -[NSURL(NSURL) initFileURLWithPath:] + 129
    ./postinstall: 4 Foundation 0x00007fff5477f248 +[NSURL(NSURL) fileURLWithPath:] + 95
    ./postinstall: 5 ApplicationPostFlight 0x000000010358445f -[LicenseCertificateManager init:productName:productVersion:] + 235
    ./postinstall: 6 ApplicationPostFlight 0x000000010358297c main + 140
    ./postinstall: 7 ApplicationPostFlight 0x0000000103580034 start + 52
    ./postinstall: )
    ./postinstall: libc++abi.dylib: terminating with uncaught exception of type NSException
    ./postinstall: /tmp/PKInstallSandbox.lhireA/Scripts/com.filemaker.FMPA18Application.pkg.C2yFHZ/postinstall: line 141: 7943 Abort trap: 6 "$SCRIPTS_FOLDER/ApplicationPostFlight" "$PACKAGE_FOLDER/Assisted Install.txt" "${pInfoPath}" "${PRODUCT_BUNDLE}"


    I can't read the binary so I can't tell you what exactly is causing this issue. But hopefully the stack error messages will provide some insight into the methods being called causing the issue.


  3. The other thing I noticed is that this folder is created in /Users/Shared/FileMaker/FileMaker Pro Advanced/18.0/ which seems to contain certain certs, licensing, config files and uninstall script.
    3a. Is this meant to live here? Is it possible for this to live somewhere else more appropriate? Applications sometimes keeps certain files and/or preferences in /Library/Application Support/<NameOfApplication>/ so I would encourageFileMaker to do something similar for keeping these sort of files on the drive.
    3b. The permissions on this directory are 777 which seems to be very permissive. Permissions should never be this permissive.

  4. I noticed that the permissions on /Applications/FileMaker Pro 18 Advanced/ are 755 and the application bundle has 777 permissions. This is way too permissive for an application. Take a look at the permissions for other applications in /Applications and you'll notice that they are usually 755.



I'm attaching an install1.log https://paste2.org/tDjcd9Bp for your analysis which is for the scenario above. You will also find the Assisted Install.txt file we are using. The launch daemon plist to reproduce the installation workflow that is used by many software management tools like Jamf Pro. Please note that this was done on a clean install of macOS 10.14.6 and there was no management tool installed. I used my experience and knowledge to try and mimic the same behavior for the benefit of reproducibility on your end.



Yet another issue with the installer:
There is also another scenario that I ran into in my testing that produces yet another weird result in the installer log. I am attaching install2.log



Steps taken to generate reproduce the Read error in installer log:




  1. Copy the Assisted Install.txt file from the FileMaker 18 DMG download and modify the following two properties:
    1a. Change the property to "AI_DISABLEVERSIONNOTIFY=1" (causes issue 3)
    1b. Change the property to "AI_LICENSE_ACCEPTED=1" (causes issue 2)

  2. Generate an installer package using the deployment script on your website: https://www.filemaker.com/support/product/docs/fmp_osx_deployment.zip
    2a. Include the full FMPA 18 installer along with the license cert file and Assisted Install.txt file.



Go to your test device and follow the steps below:




  1. Copy the installer to /Users/Shared

  2. Copy the attached launch daemon plist to /Library/LaunchDaemons/

  3. Make sure you are logged into a user with admin access.

  4. Open up Terminal and run the following command:
    sudo -i
    installer -pkg "/Users/Shared//Users/Shared/FileMaker Pro 18 Advanced ARD.pkg" -target / -dumplog -verbose

  5. Check out the install.log by going to /var/log/install.log and also see the installer log output in Terminal as well.



There's this error which seems to imply that it cannot read the path where the "Assisted Install.txt" file resides.



2019-09-25 09:42:46-04 users-MacBook-Pro installer[887]: PackageKit: Executing script "./postinstall" in /private/tmp/PKInstallSandbox.FUMfxZ/Scripts/com.filemaker.FMPA18Application.pkg.xJ99DG
2019-09-25 09:42:49-04 users-MacBook-Pro installer[887]: ./postinstall: 2019-09-25 09:42:49.320 ApplicationPostFlight[1020:5851] [Error] Error Domain=NSCocoaErrorDomain Code=256 "The file “Assisted Install.txt” couldn’t be opened." UserInfo={NSURL=file:///tmp/fmp_kNENYefmxh/Assisted%20Install.txt/, NSFilePath=/tmp/fmp_kNENYefmxh/Assisted Install.txt, NSUnderlyingError=0x7f82b7406b30 {Error Domain=NSPOSIXErrorDomain Code=20 "Not a directory"}} (file:///tmp/fmp_kNENYefmxh/Assisted%20Install.txt/)
2019-09-25 09:42:49-04 users-MacBook-Pro installert887]: ./postinstall: 2019-09-25 09:42:49.402 ApplicationPostFlightF1020:5851] isValidLicenseCert lcError: 0
2019-09-25 09:42:49-04 users-MacBook-Pro installert887]: ./postinstall: 2019-09-25 09:42:49.410 ApplicationPostFlightF1020:5851] -8NSError init] called; this results in an invalid NSError instance. It will raise an exception in a future release. Please call errorWithDomain:code:userInfo: or initWithDomain:code:userInfo:. This message shown only once.


I am attaching install2.log https://paste2.org/EZ0Npfj0 for you to analyze what could be causing that.



Sorry for the lengthy response, but I wanted to be as thorough as possible so that the engineer(s) working on this issue can reproduce and potentially resolve these issues we're running into.



Here is the launch daemon plist https://paste2.org/Y2E6pD2G


My solution to this was rather simple and did not require any scripting. It just worked. Oh well 😉


I am unable to get this to work either using the script shown above, adding the LicenseCert.fmcert line in the assisted install.txt file, or a combination of both. Adding the LicenseCert.fmcert to the assisted Install.txt file works if I run the filmmaker pro advanced package before running the script. However, the package created by running the script does not properly license FMP18.




@DavidN Scroll up and try my solution. It has been working reliably for over 2 months. No scripting needed.


And my solution is dead simple, been working great sine the summer.


@michaelprice and @howie_isaacks both are great and thanks for the solutions, problem solving etc. @michaelprice I noticed all the languages came over as well and I still have to put in the license key. Is that the way it goes with your version? Or did I miss a step? @howie_isaacks I am reading over yours and will try that too.


@sherwin - My method includes the LicenseCert.fmcert file at the root of the zipped folder. This license certificate is referenced in the Assisted Install.txt file and the info does not need to be entered at first start. We do not mind that the installer package installs all languages.




@howie_isaacks It just works! Simple, efficient. Thanks!


@michaelprice I used your method to package the installer, assisted install, and license cert. When I install the zip through Self Service, FileMaker will install properly and apply the license without issue. But if installed by being pushed directly to the machine, it will not license and the LicenseCert.fmcert cannot be found at /Users/Shared/FileMaker/FileMaker Pro Advanced/18.0



My guess is, this is because when pushing the zip, it's placing the files at a root level? Any ideas? Thanks for your screenshots thanks to anyone else with suggestions!


@rdubois We have 2 policies for FileMaker 18 client, one for Self Service and another for the automated install -- both work with the same .zip file and license properly. I'm attaching screenshots of our automated policy. This policy is scoped to individual computers. Hope this helps!




@michaelprice I can definitely say I found your solution the easiest. Thanks for saving me hours of scripting!


Reply