Installing Flash Player updates via Casper

jarednichols
Honored Contributor

I've never had issues installing Flash updates prior to this (using the Adobe Flash Player.pkg located inside the Adobe download) but I'm getting errors on test machines like:

Installer: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.

I thought it was Gatekeeper at first so I shut that off and am met with the same result. I'm able to install via the GUI Installer just fine. Anyone else seeing this?

2 ACCEPTED SOLUTIONS

Kumarasinghe
Valued Contributor

1.) Create a folder in /private/tmp called Flash

2.) Mount the DMG and copy Install Adobe Flash Player.app to /private/tmp/Flash folder

3.) Run this command ```
/usr/sbin/installer -pkg "/private/tmp/Flash/Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg" -target LocalSystem
```

View solution in original post

jhalvorson
Valued Contributor

Not sure if this has been referenced before or not, but Adobe has an Flash Player admin guide.

http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/flashplayer/pdfs/flash_player_1...

Page 20 points out their supported method for silent install using the command line as mention by a few people above.

sudo ./Install Adobe Flash Player.app/Contents/MacOS/Adobe Flash Player Install Manager -install

In theory, based on the information on page 22, you should be able to capture and deploy your desired mms.cfg after the installation to set the behavior for Flash.

View solution in original post

50 REPLIES 50

bentoms
Release Candidate Programs Tester

You need to download the dmg on the client & then call the app in the DMG.

(Something like that! My colleague got it working that way... I can ask him Monday how).

jarednichols
Honored Contributor

The app vs the pkg installer?

bentoms
Release Candidate Programs Tester

You mean the PKG in the app right?

I'm not @ a mac, but I distinctly remember the old extraction method not working.

So we needed to run what Adobe give you in the dload.

jarednichols
Honored Contributor

hmm okay. i'll head in that direction and see what you come back with early next week.

bentoms
Release Candidate Programs Tester

Check: https://jamfnation.jamfsoftware.com/discussion.html?id=4658#respond

Post you're looking for is

Posted 10/8/12 at 12:41 PM by MacDude

(Not as if you was in that discussion @ all :P)

franton
Valued Contributor III

The Flash installer pkg is a nasty hotchpotch of evilness. It does the standard pkg routine of putting files in the right places except for the actual flash plugin itself. That's stored in a compressed format that's later uncompressed by the "installer".

You're best off just snapshotting an initial install and letting 11.4's new silent background update take care of things.

Kumarasinghe
Valued Contributor

1.) Create a folder in /private/tmp called Flash

2.) Mount the DMG and copy Install Adobe Flash Player.app to /private/tmp/Flash folder

3.) Run this command ```
/usr/sbin/installer -pkg "/private/tmp/Flash/Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg" -target LocalSystem
```

luispalumbo
Contributor

What I'm doing is: - download the newest Flash Player version; - open the DMG file; - right-click the "Install Adobe Flash Player" and select "Show Package Contents"; - open "Contents"; - open "Resources"; - copy the file "Adobe Flash Player.pkg" to Casper Admin.

Then I make that available on Self-Service so students can click on that and install that from there.

I'm using version 11.4.402.265. So far, no problems.

RobertHammen
Valued Contributor II

The Auto-Updater won't work if you do that, however. You need the stupid Flash Player Install Manager which isn't installed when you do the .pkg trick. I've snapshotted the install (including setting up the AutoUpdate preferences) and deployed this without issues...

jarednichols
Honored Contributor

I used the method laying down the installer in /tmp and calling it with a script to install.

#!/bin/sh
/usr/sbin/installer -pkg /private/tmp/flash/Install Adobe Flash Player.app/Contents/Resources/Adobe Flash Player.pkg -target /

nkalister
Valued Contributor

i'm doing it the same as jared. that's my standard way of installing peculiarly packaged third party software.

RobertHammen
Valued Contributor II

But you're still installing the pkg. The pkg no longer installs every component required - the auto-update functions will NOT work with this approach (which may not matter if your users aren't admins).. You need to either:

a) run the Adobe installer (manually or by using the following command: /Volumes/Flash Player/Install Adobe Flash Player.app/Contents/MacOS/Adobe Flash Player Install Manager -install
b) snapshot the dang installer - I took this approach. I'll screen-cap my pkg if it will help some of you.

jhbush
Valued Contributor II

I'm using the first method Robert described above as a postflight script. I copy the the .app from Adobe to /private/tmp and call it from there with ```

!/bin/sh

postflight

/private/tmp/Install Adobe Flash Player.app/Contents/MacOS/Adobe Flash Player Install Manager -install
```

It's been working well and allows for quick updates as needed.

jarednichols
Honored Contributor

Since we're not dolling out admin rights like candy, I'm just going through the pkg installer. I wish Adobe was a bit smarter with the autoupdate feature and took advantage of a method to install the update without a user having admin rights. Perhaps they could put the Flash Plugin out through the App Store, though I doubt that'll ever happen and has its own set of issues.

franton
Valued Contributor III

The newest version has a launchd daemon doing the work. Those things run as root anyway, so the auto update shouldn't be asking for a password.

jarednichols
Honored Contributor

Oh? I don't seem to recall that being the case when they first launched the autoupdater.

mm2270
Legendary Contributor III

Yes, look for /Library/LaunchDaemons/com.adobe.fpsaud.plist. That daemon calls the Flash Player Install Manager application with a start interval of 3600 seconds.

franton
Valued Contributor III

I can only vouch for the version out last fortnight.

jarednichols
Honored Contributor

Hmm. I'll have to test this out. I seem to recall still needing admin rights to do the actual install itself once the update pops up. I'll be psyched if they've gotten around that now.

donmontalvo
Esteemed Contributor III

@jhbush1973 We need to test this, thanks for posting!

BTW do we know of a way to force this setting?

external image link

--
https://donmontalvo.com

jarednichols
Honored Contributor

@Don

The only way I know of is to deploy the user-level settings that appear to be in some binary file buried many levels deep in the user folder. (If you need it, I'll dig it up but I have a feeling you know which one I'm on about.)

golbiga
Contributor III
Contributor III

Isn't that in /Library/Application Support/Macromedia/mms.cfg?

There are two settings.
AutoUpdateDisable <- Set to 0
SilentAutoUpdateEnable <- Set to 1

Allen

mm2270
Legendary Contributor III

Yeah, that's where it is, or at least, that's where the setting gets stored. You can actually see it change as soon as you adjust the settings to another radio button by QuickLooking that file. I have not figured out a way to properly write a change into that file outside of using the PrefPane. One attempt I made via script actually blew away contents from the file strangely enough. I'm not clear how or what process is actually making that change under the hood.

jhalvorson
Valued Contributor

Not sure if this has been referenced before or not, but Adobe has an Flash Player admin guide.

http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/flashplayer/pdfs/flash_player_1...

Page 20 points out their supported method for silent install using the command line as mention by a few people above.

sudo ./Install Adobe Flash Player.app/Contents/MacOS/Adobe Flash Player Install Manager -install

In theory, based on the information on page 22, you should be able to capture and deploy your desired mms.cfg after the installation to set the behavior for Flash.

jarednichols
Honored Contributor

Wow great find. But....

Why the hell does a media plugin require a FIFTY PAGE ADMIN GUIDE?!?!

At least they could save a few pages on chapter 6 if they shortened it to "Security? What security?" (Witness: http://www.engadget.com/2011/05/19/adobe-dominates-kaspersky-labs-top-ten-pc-vulnerabilities-list/)

Cem
Valued Contributor

@jhalvorson
"." breaks the process with "no command found" error.
sudo ./Install Adobe Flash Player.app/Contents/MacOS/Adobe Flash Player Install Manager -install

below command works (without the dot). But shows the Adobe Flash Player Install Manager on the dock. So it is not that silent after all. sudo /Install Adobe Flash Player.app/Contents/MacOS/Adobe Flash Player Install Manager -install

donmontalvo
Esteemed Contributor III

Isn't the dot needed if you are in the same directory as the binary? From any other directory the absolute or relative path should work. I'm surprised the second path works (beginning with a slash) unless Install Adobe Flash Player.app is at the root of the boot drive.

--
https://donmontalvo.com

Cem
Valued Contributor

thanks pointing that out Don! I have put the installer in tmp folder. So command does work with dot see below. But I still see the dock item

cd /private/tmp && ./Install Adobe Flash Player.app/Contents/MacOS/Adobe Flash Player Install Manager -install

nessts
Valued Contributor II

here is my perl script, it does not show up in the dock, it installs silently and is set to not update automatically.

#!/usr/bin/perl -w

use strict;
use Getopt::Std;
use Sys::Syslog;

(my $progname =$0) =~ s#.*/##;
$ENV{PATH} = '/bin:/usr/bin:/usr/sbin';
umask 0022;


# generic variables

my $basedir     = $ARGV[2] || '/';
my $rc;
my $app_path    = undef;

my $APP;
my @APPS         = (
        "Adobe Flash Player",
);
my $installdir = "$basedir/.installfiles/FlashPlayer";
my $installpkg = "$installdir/Install Adobe Flash Player.app/";
my $installcmd = $installpkg . "Contents/MacOS/Adobe Flash Player Install Manager";
my $launchdaemon = "$basedir/Library/LaunchDaemons/com.hp.installflashplayer";

main:
openlog $progname, undef, 'user';
syslog('notice', "Installing %s
", join " ", @APPS);
$rc = system(""$installcmd" -install -setUpdateMode 2");
$rc = $rc/256;
unless($rc) {
        syslog('notice', "Install of %s successful cleaning up
", $installpkg);
        system("rm -rf $installdir");
        system("defaults write $launchdaemon Disabled -bool yes");
        system("chmod 644 $launchdaemon.plist");
}
else {
        syslog('notice', "Install of %s unsuccessful rc = %s
", $installpkg, $rc);
}
closelog;

donmontalvo
Esteemed Contributor III

@Cem If you use the absolute path, no need to cd to the folder to run the command (then no need for the dot).

sudo /private/tmp/Install Adobe Flash Player.app/Contents/MacOS/Adobe Flash Player Install Manager -install

I see what you mean about the Dock icon, I just tested it...bouncy, bouncy...I'm not even going to bother testing on a logged off Mac. ;)

Adobe needs to start having in house How To Develop For The Macintosh Platform and How To Create Succinct Documentation For Real World Administrators training classes...I nominate JAMF to give the classes as they've got it down.

Wow you guys are right, their ADOBE® FLASH® PLAYER 11.5 Administration Guide is a monster. I guess those Adobe documentation folks have to eat too. :)

I didn't find a Adobe Flash Player Enterprise Forum...does one exist?

external image link

--
https://donmontalvo.com

donmontalvo
Esteemed Contributor III

@nessts Wow, can this be used as a postflight script in a PKG, so we can push to logged off Macs? If so we're gonna owe you some beer. :)

--
https://donmontalvo.com

nessts
Valued Contributor II

it should work just fine.
just make sure you dump the install pkg to the right directory or edit the script to match.
i had some other custom stuff, like waiting for setup assistant, firstrun, and my firstboot stuff before attempting to install, but i think its down to the generic anybody can run mode.

the way i do it is this goes to my scripts directory and a launch daemon calls, it, and the postinstall if installing on a live system the starts the launch daemon, so i can use the same package for imaging and for updates.

but for only updates this should work as the postinstall.

Cem
Valued Contributor

@donmontalvo yes that is what I have done ppreviously but didn't post the full path then...
@nessts that is great! Thanks for sharing your script. I am not familiar with Perl. So according to your script what is the right directory for the package?

nessts
Valued Contributor II

my $installdir = "$basedir/.installfiles/FlashPlayer";

basedir is either / or whatever the third arg passed by the installer, which if running on a local system should equate to / as well.

Cem
Valued Contributor

@nessts
I still manage to see the dock item with your script. what am I doing wrong??

nessts
Valued Contributor II

maybe I have not paid enough attention or it installs before I get logged in. If this is the case I apologize for wasting your time. but you don't get any GUI on the screen right? And I just installed on a net booted system to watch and yes I did see the little red box, so I see what you see. again sorry for not have ever noticing that before.
If you make this run out of a launch daemon, then the update won't install until a reboot, and it will more than likely run before the user ever gets logged in and then they won't see the box.

Cem
Valued Contributor

you mean trim it like this?

#!/usr/bin/perl -w

use strict;
use Getopt::Std;
use Sys::Syslog;

(my $progname =$0) =~ s#.*/##;
$ENV{PATH} = '/bin:/usr/bin:/usr/sbin';
umask 0022;


# generic variables

my $basedir = $ARGV[2] || '/';
my $rc;
my $app_path = undef;

my $APP;
my @APPS = (
"Adobe Flash Player",
);
my $installdir = "$basedir/.installfiles";
my $installpkg = "$installdir/Install Adobe Flash Player.app/";
my $installcmd = $installpkg . "Contents/MacOS/Adobe Flash Player Install Manager";

main:
openlog $progname, undef, 'user';
syslog('notice', "Installing %s
", join " ", @APPS);
$rc = system(""$installcmd" -install -setUpdateMode 2");
$rc = $rc/256;
unless($rc) {
syslog('notice', "Install of %s successful cleaning up
", $installpkg);
system("rm -rf $installdir");
}
else {
syslog('notice', "Install of %s unsuccessful rc = %s
", $installpkg, $rc);
}
closelog;

then install the package with startup trigger policy?

mm2270
Legendary Contributor III

I've been watching this thread for a while now and I'm beginning to use the lay down the Inataller.app to /tmp and run manually method as outlined in several posts above. The only small item is that blasted icon that shows up in the Dock. Fortunately it only takes about 10 seconds for the install to complete, so its minor, but I've just gotta wonder what twisted definition of "silent" Adobe seems to maintain internally. Silent means the user sees nothing. I'm not sure why they just can't seem to understand this. :{

nessts
Valued Contributor II

so leave the perl script as it.
but also in your wrapped package, deploy a launch daemon something like this...
then the next time the computer boots its going to run, and likely it will run before the user ever gets logged in.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Disabled</key>
        <false/>
        <key>Label</key>
        <string>com.hp.installflashplayer</string>
        <key>ProgramArguments</key>
        <array>
                <string>/Library/Application Support/HPES/sbin/InstallFlashPlayer.pl</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>UserName</key>
        <string>root</string>
</dict>
</plist>