(macOS) Silent install, pre-enter license

  • 3
  • Question
  • Updated 3 weeks ago
We would like to pre-enter our enterprise license key for Mac users so no manual entering of the license is needed during installation.

/Users/<username>/Library/Preferences/com.mindjet.mindmanager.10.plist is the file.

What key can be used?

Or is there another way to do a completely silent install without the need to enter the license key?
Photo of Mario

Mario

  • 7 Posts
  • 1 Reply Like

Posted 2 years ago

  • 3
Photo of aHa!Coaching

aHa!Coaching, Champion

  • 1192 Posts
  • 118 Reply Likes
Interesting question, as there's no documentation about this.

There is a good Large Scale Deployment Guide for MindManager Enterprise for Windows, but this guide lacks descriptions for MindManager for Mac.


It looks like the license information is stored one level lower in a .plist file in:

/Users/<username>/Library/Preferences/ByHost/com.mindjet.mindmanager.10.<Hardware UUID>.plist 

That is the file that contains the license key (see screenshot below).





Part of why and how the file is structured is described here:
https://www.cnet.com/news/about-the-os-x-byhost-preferences-directory/
Photo of Mario

Mario

  • 7 Posts
  • 1 Reply Like
Great, thank you very much! Wasn't aware of the ByHost preference files existing. We will try to write this as soon as we have a valid license key by using a 'defaults write' command with elevation. I will report my findings here afterwards.
Photo of Mario

Mario

  • 7 Posts
  • 1 Reply Like
Can confirm, this works perfectly!
Photo of Björn

Björn

  • 1 Post
  • 1 Reply Like
Is this also valid for MindManager v. 11? I'm writing the serial into the plist but the software always opens in Trial Mode.
Photo of Maurits

Maurits

  • 5 Posts
  • 3 Reply Likes
I have the same question as Bjorn. Any news?
Photo of Maurits

Maurits

  • 5 Posts
  • 3 Reply Likes
This script works, tested on 10.14.2 and MindManager 11.2.117: ( I used this as a post-install script in AirWatch) .

Add your own licence key a the AP11-*** places....


#!/bin/sh# Maurits Sanders 12 dec 2018 maurits@prowarehouse.nl

loggedInUser=$(/usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");')

echo "loggedInUser : " $loggedInUser
## Get UUID of device
UUID=$(ioreg -d2 -c IOPlatformExpertDevice | awk -F\" '/IOPlatformUUID/{print $(NF-1)}')
echo "UUID : " $UUID
## Run the defaults command on their plist
/usr/bin/defaults write /Users/$loggedInUser/Library/Preferences/ByHost/com.mindjet.mindmanager.11.$UUID LicenseKey AP11-***-*
## to run locally as local user: run  'defaults -currentHost write com.mindjet.mindmanager.11 LicenseKey AP11-***-*. '
## Correct permissions on the plist
/usr/sbin/chown $loggedInUser /Users/$loggedInUser/Library/Preferences/ByHost/com.mindjet.mindmanager.11.*
exit 0
(Edited)
Photo of chrisBonX

chrisBonX

  • 1 Post
  • 0 Reply Likes
I found a much easier way to deploy the MindManager 11.x license:

Take the ByHost preference file and delete the UUID in the file name - you get "com.mindjet.mindmanager.11.plist"

Copy this plist file to /Library/Preferences/ and apply read & write permissions for System (root) and MindManager is licensed for all (local) users.


(Edited)
Photo of Maurits

Maurits

  • 5 Posts
  • 3 Reply Likes
Thanks chrisBonX, that is even better going forward (10.15 had more restrictions on installing in user space). I have a Postinstall script that looks like this for MindManager v12

#!/bin/sh

# Maurits Sanders 26 june 2019

#clear settings
/usr/bin/killall cfprefsd


/usr/bin/defaults write /Library/Preferences/com.mindjet.mindmanager.12 LicenseKey AE12-M1M-xxx-xxx-

exit 0

(Edited)