Posted on 05-22-2019 05:36 PM
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?
Posted on 05-27-2019 01:23 AM
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
Posted on 05-28-2019 10:17 AM
Whew! I thought I was the only one experiencing this issue. I'm still learning Jamf and thought I was doing something wrong.
Posted on 06-03-2019 07:15 AM
Still struggling with this... Oy!
Posted on 06-03-2019 08:37 AM
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
Posted on 06-03-2019 10:56 AM
@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
Posted on 06-06-2019 01:43 AM
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]
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
Posted on 07-14-2019 07:48 PM
@hepvd - can you please provide this script in a github gist or something so that it is easier to refer to?
Posted on 07-18-2019 06:34 PM
Hi there folks.
In lieu of a reply, I put up a gist: https://gist.github.com/nzmacgeek/9ac977ee58ab01fd00bb2a1398e3236f
Posted on 07-19-2019 06:10 AM
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
Posted on 08-07-2019 12:06 PM
I was able to get package to work with the last shared script and instructions.
Posted on 08-08-2019 03:46 PM
z
Posted on 08-08-2019 04:15 PM
z
Posted on 08-14-2019 10:53 AM
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!
Posted on 08-19-2019 07:42 AM
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:
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.
07-21-2021 09:08 AM - edited 07-21-2021 09:09 AM
This worked great & is very simple. No scripting or post-install process required.
Thank you.
I am a noob... how does the policy know run the pkg after unpacking the zip? Does any pkg archived within a zip get run by default on unpacking?
Posted on 09-25-2019 07:31 AM
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:
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:
Go to your test device and follow the steps below:
chown root:wheel /Library/LaunchDaemons/com.test.fmpainstall.plist
chmod 644 /Library/LaunchDaemons/com.test.fmpainstall.plist
sudo launchctl load /Library/LaunchDaemons/com.test.fmpainstall.plist
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"
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:
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:
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 "~".
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.
/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./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:
Go to your test device and follow the steps below:
sudo -i
installer -pkg "/Users/Shared//Users/Shared/FileMaker Pro 18 Advanced ARD.pkg" -target / -dumplog -verbose
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 installer[887]: ./postinstall: 2019-09-25 09:42:49.402 ApplicationPostFlight[1020:5851] isValidLicenseCert lcError: 0
2019-09-25 09:42:49-04 users-MacBook-Pro installer[887]: ./postinstall: 2019-09-25 09:42:49.410 ApplicationPostFlight[1020:5851] -[NSError 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
Posted on 09-27-2019 01:33 PM
My solution to this was rather simple and did not require any scripting. It just worked. Oh well 😉
Posted on 10-23-2019 12:23 PM
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.
Posted on 10-24-2019 02:04 PM
@DavidN Scroll up and try my solution. It has been working reliably for over 2 months. No scripting needed.
Posted on 10-29-2019 12:05 PM
And my solution is dead simple, been working great sine the summer.
Posted on 11-01-2019 03:53 PM
@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.
Posted on 11-04-2019 08:25 AM
@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.
Posted on 01-04-2020 11:09 PM
@howie_isaacks It just works! Simple, efficient. Thanks!
Posted on 01-28-2020 07:56 AM
@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!
Posted on 01-29-2020 10:40 AM
@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!
Posted on 01-30-2020 12:52 PM
@michaelprice I can definitely say I found your solution the easiest. Thanks for saving me hours of scripting!
Posted on 02-20-2020 01:47 AM
Hi All.. I'm hoping someone can shed some light please, as I seem to be able to use the revised AppleRemoteDesktopDeployment.sh script and also tried the zip upload to jamf self service all with success on the install. The only problem is i'm getting this error each time I open the application and I can't work out what it is relating to? Is the fmcert not loading or incorrect? If i change the Assisted Install.txt to 0, instead of 1 i get cant find "0".
Posted on 04-27-2020 12:14 PM
Our organization was having the same issue, we were able to get it working by placing the cert file into a .pkg (repackaged), essentially using @michaelprice's method. However we were still having issues on our windows side.
Just to share for anyone else who is having a similar issue with the Windows installer; the fix is essentially the same, the key (hah) ended up being to set the "AI_LicenseKey" property to "LicenseCert.fmcert" as mentioned above for the mac version. On the windows side I edit the .msi installer and modify the properties directly so that I don't need to include the assisted install file. So in addition I have the following properties set which worked:
- AI_LICENSEKEY=LicenseCert.fmcert
- AI_LICENSE_ACCEPTED=1
- AI_REGISTRATION=0
- AI_SKIPDIALOG=1
- AI_TRIALORLICENSEKEYORCERTIFICATE=CERTIFICATE
Then I just install with "msiexec.exe /i installername.msi /qn /norestart" and it's working like a charm.
Posted on 05-12-2020 12:50 PM
Has anyone had any luck auto provisioning hosts with the FileMaker Pro 18 installer? Right now users have to manually enter in the host, and would prefer having this included with the install.
Posted on 05-22-2020 07:43 PM
What worked for me was to do the normal ARD package process with the main FileMaker application, then put the .fmcert file from /Users/Shared/FileMaker/FileMaker Pro Advanced/18.0/LicenseCert.fmcert in its own package using Composer. Then I added the ARD pkg and the fmcert pkg to the same policy. Only one extra step.
Posted on 05-28-2020 05:52 PM
@michaelprice Your way does install the app, and I believe it sees the license cert, but it doesn't appear to see the AssistedInstall file. The user is prompted to accept the license, which is exactly what we don't want. I know I had issues with FMP17 but we got them resolved. I can't remember how though. Has anyone had any luck getting the license to be accepted?
Posted on 05-30-2020 02:23 PM
I just packaged up filemaker pro 19 using the script, assisted.txt, license.fmcert file and the app all in one folder. did the chmod to the script as the instructions say. edited the assisted.txt (nothing entered in license information line), suppressing dialogs, company name, kept the updates to inform the user that updates are available, but turned off the option to not notify of new versions
ran the script, uploaded the pkg, tested and the package installed. I run the application --> about filemaker pro and the license key information is displayed
Posted on 06-17-2020 09:43 AM
I was looking for some information on how to deploy Filemaker 19 and saw tcandela's response above (that it worked for him) and couldn't figure out why the script wasn't working for me. Apparently, the script is different than the one posted by hepvd. Here is the link to the correct instructions for anyone that's looking https://help.claris.com/en/pro-network-install-setup-guide/#install-filemaker-pro-macos . The script in the link (there's a link within that page to download it) searches for the .app instead of .pkg and then creates the correct .pkg file. The instructions are pretty much the same except the script needs to be specific to FileMaker 19.
Posted on 07-07-2020 10:09 AM
@jmbwell's method worked for us with FMPA 18.
Posted on 06-21-2021 04:28 AM
@aco1010 Thank you, it worked very well for the FileMaker 19 version for us