Deploying AirParrot2

mjohnston
New Contributor

Trying to deploy a licensed version of AirParrot2 and it's showing up on the user machines as unlicensed.
I have built both pkg and dmg's of my licensed version using Composer.
I have enabled the FEU option on the dmg and no change.
From what I believe, I need to get the plist file which contains the license onto the machines.

I'm at a roadblock and would appreciate any thoughts or comments.

Thanks,
Matt

17 REPLIES 17

davidacland
Honored Contributor II
Honored Contributor II

If it's a plist in the users home, FEU should be ok. Does the file end up in the right place and does it all look correct?

What happens if you manually copy the plist into place after deploying the package?

rderewianko
Valued Contributor II

It should be the same as reflector, but a different plist, location should be the same.
We deployed reflector 2, and the plist was com.squirrels.Reflector-2.plist, if they're doing it right, you should look for com.squirrels.Airparrot-2.plist

More Info Here

mjohnston
New Contributor

Thanks guys.
@rderewianko I had been to this page but not sure the best way to package up a plist file. Any clues?

@davidacland I'll see what happens if I manually copy the plist to this users machine.

Thanks,
Matt

rderewianko
Valued Contributor II

@mjohnson
Navigate to: /Library/Preferences/
drag the plist into a composer window, package it up with permissions of root:wheel Read Write
Read Read
(mode 644)

Package up (separately from the app, as then you can just build Airparrot 2 as a separate app, instead of licensing it every time)

78deb3003be641e2b8d064c7100ca0d4

mjohnston
New Contributor

Hey @rderewianko I did this exactly as you suggested.
It's packaging it and installing it to /users/*/library/preferences which was where it was on my computer.
It is not showing up on the remote machine and creating a mjohnston user folder and putting it in there.
How do I get it to deploy to the remote users user folder and not mine?

mcooper
New Contributor III

@mjohnston You need to drop the plist into /Library/Preferences as @rderewianko suggested, not ~/Library/Preferences.

mm2270
Legendary Contributor II

Anything being deployed to user's home directories needs to be built in DMG format and then you need to make sure to check the FEU (and optionally FUT) boxes for the package when added to the policy. Otherwise it won't know what you're looking to do and will just auto create the directory path for the plist file, as you just saw.

Edit: or, do as @mcooper suggested and put it in the global /Library/Preferences/ directory and not specific user ones. That's the better option if the application supports that.

mjohnston
New Contributor

The plist at /Library/Preferences is a 0byte file and contains no data.
Only the one in my user folder contains the license key.

@mm2270 I have already done this and was not successful.

I wonder if packaging the plist from the administrator (common to all our macs) account would make a difference?

mcooper
New Contributor III

@mjohnston Take the plist with the license info from your ~/Library/Preferences folder and put it into /Library/Preferences in Composer.

davidacland
Honored Contributor II
Honored Contributor II

I would take the plist in your ~/Library/Preferences, drag it into Composer, create a DMG package and use the FUT & FUE options to have it deploy to the target user homes on the remote machines.

If the app supports the file being in the top level /Library/Preferences then that will be a lot easier. I haven't ever tried that with preferences so not sure if it would work.

mjohnston
New Contributor

@mcooper I did the old switcharoo like you suggested.
Put my known good plist file into the Composer source that points to /Library/Preferences.
Made a pkg from it and pushed it to an unlicensed machine and it's no longer says trial version.
I think we're good!

Thank you everyone for your help. As always, this forum helps me out and I will not be laying awake tonight thinking about this :-)

Jaxson75
New Contributor II

All, I know this is an old post but I did this for our Reflector 2 deployment and everything works great. BUT how do we get the broadcast name to show their current system without going into Reflector preferences to refresh it.

Jaxson75
New Contributor II

Would this script help to what I want it to do?

!/bin/bash

on connectedDevice()
tell application "Reflector 2"
activate

end tell

tell application "System Events"
keystroke "," using command down

end tell
delay 2
tell application "Reflector 2"
quit
end tell

end connectedDevice
connectedDevice()

exit 0

davidacland
Honored Contributor II
Honored Contributor II

Using system events might be a bit unpredictable as it assumes the app is running and is in the foreground. If a user clicks on another app before the keystroke "," it will fail.

I would test a defaults write into the preference file to see if that works any better.

For Reflector 2, what are you including in the preference file?

Jaxson75
New Contributor II

if you are referring to the Plist, it's the license info only.

ehendricks
New Contributor III

@mcooper I tried this, but no luck. Should I package the entire Preference Folder (with .plist added) or just the .plist file in /Library/Preferences?

Also, should I use DMG? I tried using a regular package, but still asks for a license key.

P.S. I am wanting to install Reflector Teacher.

rderewianko
Valued Contributor II

So, for reflector. We no longer use the above..

We went with a script

#!/bin/sh
#Filename: Reflector2KeyDeploy.sh
########################################################################
# Created by: Ross Derewianko
# Creation Date: May 2015
# Last modified: May 24, 2015
# Brief Description: Deploys License key for Reflector 2
########################################################################
if [ "$4" != "" ] && [ "$key" == "" ]; then
  key=$4
fi

loggedinuser=$(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 + "
");')
gid=$(id -g $loggedinuser)

defaults write /Users/"$loggedinuser"/Library/Preferences/com.squirrels.Reflector-2.plist LicenseKey "$key"
chown $loggedinuser:$gid /Users/"$loggedinuser"/Library/Preferences/com.squirrels.Reflector-2.plist

exit 0

And then adding this to a policy you'd put your key in Perameter4