How to create Flash Player Installer from their DMG, Best Practices

gspiese
New Contributor III

I RTFM and searched the discussions, but didn't find what I was looking for. Hoping the group has some patience as they enlighten me with their genius...

In the past I've created Packages by using snapshots. I now want to just use the DMG supplied. I did read the Admin Guide about Composer, but it wasn't clear enough for me to get my head around it, so excuse me for being a re-newbie (I used Casper first when it was new and NetOctopus- kripes! This guy is OLD- before that).

In this case it's The Adobe Flash Player 11.3.300.257. First I got the full installer from Adobe that I believe is self contained. I first tried just plopping the DMG into the Casper Admin.app, indexed it, gave it a category, saved it to JSS. Then using Remote sent it to my test Mac. Remote said it succeded. Looking at the Internet Plugins on the test Mac, the version didn't change. I assume the install wasn't sucessful, darn!

Next, I tried using Composer to convert the DMG to Source then to a PKG. Used Remote to send it to the test Mac and the plugin version didn't change. I looked to the Composer Manifests but that takes the install from my working Mac (it's not an imaging only Mac), but that's not what I wanted.

I looked to an Adobe Flash Player. dmg file we are deploying (an earlier version) that works fine. Getting info in Casper Admin.app doesn't reveal anything special that I could see. So I cant reverse engineer the working Flash installer.

Can anyone give me a step-by-step on how to use the Adobe supplied Flash Player DMG to create a package that will work using Remote to properly install it on my test Mac, then the rest of the Macs?

George Spiese

38 REPLIES 38

mm2270
Legendary Contributor III

You cannot use DMGs downloaded from a vendor "as is" and upload to Casper Admin and expect it to work. The DMG format for Casper is, for all intents and purposes, a proprietary Casper only format. It uses a file structure that mimics the folder structure on the target system to know where the files should land during the install process.

For FlashPlayer, your best bet is to drill down into the pkg (Control click on it, choose "Show Contents") and navigate to /Contents/Resources/ and grab the "Adobe Flash Player.pkg" installer and use that.
Keep in mind the pkg has a postflight script in it that may or may not work properly when just deployed as is via Casper. We've had mixed results when doing it this way.
Also, the recent 11.3.x update Adobe released finally added the silent auto update feature Adobe introduced in the Windows version some months back. We're still debating here whether we want to allow this mechanism to run and auto update our clients or if we need to have control over it. Its a double edged sword - on one hand it would be really nice to let Flash update itself since its a PITA to keep on top of it. On the other hand, allowing Adobe to manage the update process on our Macs isn't the most comfortable situation for us.
We're looking at possibly disabling the LaunchDaemon that gets installed and then manually calling the new "fpsaud" executable that gets installed in /Library/Application Support/Adobe/Flash Player Install Manager/ That way we can use the official auto update process Adobe introduced, but still call it on our own when we want. No more packaging Flash player with that method, which sounds like the best overall plan.

rockpapergoat
Contributor III

i use the luggage to automate downloading the latest version and packing it up.

example here: https://github.com/rockpapergoat/luggage/tree/master/flashplayer

otherwise, you should be able to drop this pkg into your casper repository, and it should work: Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg

CasperSally
Valued Contributor II

I do what rockpapergoat mentioned above, extract the Flash Player.pkg. Then I rename it with version number for my use only, and send that out.

gspiese
New Contributor III

Thank you rockpapergoat for your suggestion to use luggage. For this issue it might be overkill, but I've captured the link for possible use later...

mm2270 and CasperSally thanks for widdling down to the barest essentials. the Flash Player.pkg yanked from Contents/Resources after Control-Clicking/Show Package Contents and just dropped that into Casper Admin.app, indexed it and saved it- got the package available in Remote. Deployed it just fine.

Now all I need to figure out is how to disable the FlashPlayerSoftwareAutoUpdateDaemon (fpsaud) now residing in /Library/Application Support/Adobe/Flash Player Install Manager!

I tried to force it to run by removing the new internet plugin with an older version hoping it would see it and say Hey! there's a newer version! I need to see what goes on with it. Is there a way to get the daemon to find an update to install?

mm2270
Legendary Contributor III
I tried to force it to run by removing the new internet plugin with an older version hoping it would see it and say Hey! there's a newer version! I need to see what goes on with it. Is there a way to get the daemon to find an update to install?

i haven't figured that piece out yet. In initial testing it hasn't worked for me either. But then I remembered that Adobe also introduced sandboxing and other security measures in the 11.3 release so its possible this executable can't actually be called outside of the LaunchDaemon at /Library/LaunchDaemons/com.adobe.fpsaud.plist

As for disabling the auto update, I'm not 100% sure, but i think just disabling the LaunchDaemon should take care of it, because the daemon is what calls it once a day.

sudo launchctl unload -w /Library/LaunchDaemons/com.adobe.fpsaud.plist

Again, not tested yet and I likely won't get around to that anytime soon, so give that a try and see if it works.

gspiese
New Contributor III

I guess I need to find-out how to kick-start the daemon to see what it does when it works so when I disable (unload) it, I can see tha it doesn't... work : }

donmontalvo
Esteemed Contributor III

@CasperSally That's our process whenever we have a 3rd party PKG installer that we validate (ie: doesn't blow up our LAB); we use Vendor_Application_Version.pkg.

@gspiese Here's an interesting nugget:

http://arstechnica.com/civis/viewtopic.php?f=3&t=1176065&start=0&mode=reply

> The updater will use a launch daemon to check for updates every day. Really? From what I know from /Library/LaunchDaemons/com.adobe.fpsaud.plist it seems that this auto updater starts every 3600 seconds.
--
https://donmontalvo.com

mm2270
Legendary Contributor III

@Don, actually my understanding was that it is set to run every 3600 seconds, but once it receives a "no updates found" back from the mothership, it sleeps until the next day, than runs again. I'm not sure if that's actually what its doing, but that's what I read about somewhere.

Kumarasinghe
Valued Contributor

Package Adobe Flash Player 11 with auto update disabled

1.) Create a folder in /private/tmp called Flash
2.) Mount the DMG > Right-click Install Adobe Flash Player > Show Package Contents > Copy the "Contents" folder into this folder

3.) Disable auto-update notification

* Create or open the mms.cfg file in a text editor. Add the following auto-update setting:

AutoUpdateDisable=1

* Save the mms.cfg file with UTF-8 encoding to Desktop.

* Copy the mms.cfg file to /private/tmp/Flash folder

More info about auto update disable feature;
http://helpx.adobe.com/flash-player/kb/administration-configure-auto-update-notification.html

4.) Drag this /private/tmp/Flash folder into Composer, in preparation of creating an installer pkg from it
5.) Change permissions to root and wheel as below

$ sudo chown -R root:wheel /private/tmp/Flash/mms.cfg
$ sudo chmod 644 /private/tmp/Flash/mms.cfg

6.) Create a postflight script with the following command:

#!/bin/sh
## postflight

pathToScript=$0
pathToPackage=$1
targetLocation=$2
targetVolume=$3


# Install Flash Player
installer -pkg "$3/private/tmp/Flash/Contents/Resources/Adobe Flash Player.pkg" -target LocalSystem

# Disable Automatic Updates
/usr/bin/ditto /private/tmp/Flash/mms.cfg "/Library/Application Support/Macromedia/"



exit 0          ## Success
exit 1          ## Failure

5.) Create a non-flat PKG.

ernstcs
Contributor III

All you crazy kids and your scripting, and I say that only because I'm terrible at it. Although this is good to know, and thank you for it, I'd just put the PKG directly in as prescribed, and then make a DMG of the mms.cfg file where it ultimately ends up already edited and install it with a higher priority. I always install Flash AFTER any Creative Suite installs and have the check boxes set for install on boot volume.

Always about 8 different ways to skin a Mac OS X cat I'd say...

donmontalvo
Esteemed Contributor III

I can't help but cringe when I see stuff like this...Adobe engineers who don't understand Windows paths vs Mac paths.

Heck, even if the slashes are in the wrong direction, could the engineer be farther off base with the location of that folder?!

external image link

Don

--
https://donmontalvo.com

mm2270
Legendary Contributor III

Yeah, I see that stuff all the time. Usually someone responsible for writing up docs that has knowledge only of Windows and zip knowledge of the Mac. And it should be labeled as "Mac OS X" or "OS X", not Macintosh (hardware) since everything else in that list is an OS.

tkimpton
Valued Contributor II

Thanks Craig for hitting home the obvious. Sometimes its easy to get carried away with scripting when its not really necessary ;)

tkimpton
Valued Contributor II

or even better

  1. Install the Flash player normall and make the change to the /Library/Application Support/Macromedia/mms.cfg to read AutoUpdateDisable=1

  2. Mount the install_flash_player_osx.dmg

  3. Right click install Adobe Flash Player and select show package contents

  4. Navigate to the Contents/Resources and drag Adobe Flash Player.pkg in to the sources pane of Composer

  5. Drag the /Library/Application Support/Macromedia/mms.cfg in to the source you just created in Composer

6 Build it as a newly created (non-flat package) in Composer

jwojda
Valued Contributor II

I used composer to bundle flash 11.3.300.x using the preinstalled software and everything seems okay, except for some reason it keeps bundling my user folder. I looked in the policy and saw teh FUT/FEU was unchecked and greyed out, so I removed the pkg and re-added it and verified it had them checked.

I then saved the policy and re-edited it, and saw they were unchecked again.

I'm sure it's something stupid like you can't use a pkg with FEU/FUT...

nessts
Valued Contributor II

before you make the package expand the file sections and remove your user directory, or maybe that is too simple and you have done that already.

mm2270
Legendary Contributor III
I'm sure it's something stupid like you can't use a pkg with FEU/FUT...

Uh, yeah, you can't use FEU and FUT with a PKG install, only with a DMG.
If you plan to make it into a PKG, you'll need to delete the entire /Users/ folder path from Composer before building it. If you don't, when you deploy it to any Macs that don't actually have your home folder already on them, you'll get a basically empty home directory with just the folders/files captured in the package and nothing else. Not what you want.

jwojda
Valued Contributor II

i didnt remove it because I there was flash stuff in it? if I dont need it then I will remove it, but I've never really packaged flash before and didn't want to start randomly removing folders.

jwojda
Valued Contributor II

There's also a .PKInstallSandboxManager folder, it looks to be empty, can I delete it?
I've never seen it in any of my other pkg files

mm2270
Legendary Contributor III

Empty folders can and do come up when using the Pre-Installed manifest option in Composer. Whenever I see them pop up with that method, I always remove them and have never had an issue with the pkg later on. That's not to say in some very rare cases removing it could cause issues with the install, but 99.9% of the time its OK to delete those empty directories.

But to back up a second, why are you using the Pre-Installed Manifest anyway? For the new FlashPlayer, it may not even work since the 11.3.300 adds new files and folders the manifest may not even be aware of, and therefore not capture. Read up further on this thread where its talked about pulling the pkg install buried inside the Flash Player installer application. That's going to be the better way to go here.

donmontalvo
Esteemed Contributor III

Are we sure there are no invisible files in that folder? The folder starts with a DOT (".") so it shouldn't be a problem, should it?

--
https://donmontalvo.com

jwojda
Valued Contributor II

@mm2270 I tried that method, didn't seem to work for me, it didn't seem like the script ran at the end or something...

mm2270
Legendary Contributor III

@jwojda - I'm not sure why that would be, but I can pretty much assure you using the Pre-Installed Software method isn't going to capture all the new files. I tested this today after I posted to be sure. Downloaded the latest manifests from JAMF into Composer, tried it and it didn't capture the new fpsaud file, the new LaunchDaemon and a few other things. The diff file hasn't been updated yet and isn't aware of all the new components. The description from Composer-
"This package manifest was tested with Adobe Flash Player 10.0.45.2 on Mac oS X 10.6.3 on 5/19/2010"
Its waaaay out of date. You're not going to get good results using that method with Flash Player 11.3.x. Just sayin'

rockpapergoat
Contributor III

all my installers are pkg format generated by the luggage. i don't use any dmg container formatted "packages" from composer (except for legacy stuff that's still around and not broken). i simulate casper's "FEU" function with post flight actions like this:

https://gist.github.com/3020305

do something similar if it's helpful to you.

donmontalvo
Esteemed Contributor III
Uh, yeah, you can't use FEU and FUT with a PKG install, only with a DMG.

@mm2270 @rockpapergoat Along with Nate's excellent script, another option to FEU and FUT on PKG format packages is a simple script that we created with help from the JAMF Nation list members...lets you FUT and FEU when using PKG format packages. Quite honestly we never, ever use DMG format packages (only Casper can use DMG packages; we need our packages to be usable by Help Desk, On Site Support, Advanced Support, etc.):

https://jamfnation.jamfsoftware.com/discussion.html?id=11

--
https://donmontalvo.com

mm2270
Legendary Contributor III

@Don, fair enough. My response was that the default settings in Casper Suite don't allow for using the FEU and FUT checkboxes in a policy/Casper Remote, etc to be used with a PKG, only with a DMG. I have done similar scripts myself for standalone package installs that needed to drop preferences to a user level Library folder. It works fine, but just checking a box in Casper Admin or a policy ain't gonna do it.

awimmer
New Contributor

A few questions about the Adobe Flash auto-updater. I have been extracting the installer pkg as above and updating Flash with a policy. All works fine. In my situation I'd actually like to have the auto-updater function. The last version I installed is 11.3.300.268 and I don't see any users auto-updating. Do I need to customize the installation in order to implement auto-updating? Does the auto-updating work for a standard user? Thanks for any insights.

jarednichols
Honored Contributor

Yes. There's an item in the /Utilities folder that you need to capture for the update mechanism to work. (What it's called escapes me at the moment.)

Be aware though, that users still need admin rights to install updates through this mechanism. I think Adobe was rather stupid with that. Thus we're still pushing out the updates manually.

mscottblake
Valued Contributor

What are the benefits of creating a non-flat pkg over a snapshot dmg in Composer? This all seems like a lot of extra work and I don't see any positives.

@jarednichols: I'm right there with you. Once they remove the need for elevated privileges, we will start enabling that option as well.

ernstcs
Contributor III

To me there really isn't any huge advantages to using PKGs if it's not something already made for you that way. A PKG is useful if you're giving the package itself directly to a user to install something by hand because that's a known method to install for them, the DMG of files doesn't really work in that scenario.

In some instances using the capabilities within Composer can help streamline a few things. For example you can still package up Xcode app, but then include a postflight script to install the mobile support tools as well. Or when we install our root certificate, the file gets copied to the location we want and then the script runs the security command to install it. Let's say you want to blow away previous file version before install, to do that now in the JSS requires you to create a script of it anyway if you didn't have a DMG to uninstall. This is helpful in making packages idiot proof. Another person that may need to help with the system doesn't need to know the commands to install something like if they had to create a self service policy, all the little idiosyncrasy are baked into the PKG. Since you can't do anything like package dependencies in admin, it's helpful there, too. I try to keep things as modular as possible, but that can cause issues later if there is a dependency on another package.

In the managed system scenario a DMG can give you advantages when you index the package when you upload it. You can then uninstall those files easily (not that you can't do something similar with PKGs) and self-healing becomes an option.

donmontalvo
Esteemed Contributor III

@ernstcs wrote:

A PKG is useful if you're giving the package itself directly to a user to install something by hand because that's a known method to install for them, the DMG of files doesn't really work in that scenario.

Ditto...we only use PKG/MPKG, since all packages need to be usable by Help Desk, Desktop Support, Advanced Support, remote users, etc.

We use a loop script to FUT and FEU, and we don't miss the ability to uninstall (which can be problematic if an install overwrites or merges with existing files).

So while we use DMG as a delivery "envelope" for our packages, the format is still PKG/MPKG. The AAMEE fiasco is a good example where our delivery method fits in nicely with JAMF's workaround:

https://jamfnation.jamfsoftware.com/article.html?id=161

Don

--
https://donmontalvo.com

MacDude
New Contributor

So, according to Adobe's EULA, you're not allowed to dig the PKG out, you are supposed to use the following:

  1. Mount the DMG
  2. Execute the following command line: /Volumes/Flash Player/Install Adobe Flash Player.app/Contents/MacOS/Adobe Flash Player Install Manager -install

Unfortunately, this approved method does flash a dock icon. It also installs the Update Manager, and still respects the mms.cfg file.

More info here: http://managingosx.wordpress.com/2012/08/22/flash-mob/ (and the blog posts before and after that one.)

donmontalvo
Esteemed Contributor III

Sounds like something that can be scripted and pushed with Casper, but still requires a logged in user. They really need to give Jody Rodgers control there. ;)

For a while Adobe was asking enterprise folks to submit formal summaries of how risk/liability is impacted by our inability to easily deploy and patch Flash.

I think Adobe is listening. :)

Don

--
https://donmontalvo.com

andyinindy
Contributor II

Along these lines, it appears that the latest Flash installer (11.5.502.149?) does not contain a PKG like it used to. Apparently the installer downloads the PKG behind the scenes when you run it (although this is failing on my system). Has anyone managed to locate a PKG of the latest Flash player?

UPDATE: Note to self, check the board before reviving an old thread. Thanks, @colonelpanic!

http://fpdownload.macromedia.com/get/flashplayer/pdc/11.5.502.149/install_flash_player_osx.dmg

mscottblake
Valued Contributor

Even if you use the version that downloads itself, if you let it download and unpack you can right-click on the dock icon and then Options>Show in Finder. Then you can perform the same steps you would take if you downloaded the DMG yourself.

tomt
Valued Contributor

I used Scott's method to grab the .pkg and it seems to be deploying just fine in my test group.

franton
Valued Contributor III

I guess i'm the only one doing a snapshot install package with the internal updates turned off. There's a lot of effort going on in this thread!

Not applicable

I used the Package Manifest method in Composer 8.63 and got a working install, though that obviously doesn't change the autoupdate settings. $0.02.