Skip to main content
Solved

Installing Flash Player updates via Casper


Did this topic help you find an answer to your question?
Show first post

50 replies

Forum|alt.badge.img+17
  • Contributor
  • 352 replies
  • November 21, 2012

@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
Forum|alt.badge.img+36
  • Legendary Contributor
  • 4293 replies
  • November 21, 2012

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.


Forum|alt.badge.img+17
  • Contributor
  • 352 replies
  • November 21, 2012

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

Forum|alt.badge.img+18
  • Valued Contributor
  • 1007 replies
  • November 21, 2012

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
Forum|alt.badge.img+36
  • Legendary Contributor
  • 4293 replies
  • November 21, 2012

@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


donmontalvo
Forum|alt.badge.img+36
  • Legendary Contributor
  • 4293 replies
  • November 21, 2012

@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. :)


Forum|alt.badge.img+18
  • Valued Contributor
  • 1007 replies
  • November 21, 2012

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.


Forum|alt.badge.img+17
  • Contributor
  • 352 replies
  • November 21, 2012

@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?


Forum|alt.badge.img+18
  • Valued Contributor
  • 1007 replies
  • November 21, 2012

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.


Forum|alt.badge.img+17
  • Contributor
  • 352 replies
  • November 21, 2012

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


Forum|alt.badge.img+18
  • Valued Contributor
  • 1007 replies
  • November 21, 2012

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.


Forum|alt.badge.img+17
  • Contributor
  • 352 replies
  • November 21, 2012

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
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • November 21, 2012

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. :{


Forum|alt.badge.img+18
  • Valued Contributor
  • 1007 replies
  • November 21, 2012

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>

Forum|alt.badge.img+17
  • Contributor
  • 352 replies
  • November 21, 2012

@nessts gotcha! will try tomorrow....


mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • November 21, 2012

I found a simple way around the icon showing up in the Dock when deployed via policy, and quite frankly I'm surprised it actually works. I assumed some security measure preventing any tampering with the installer would have stopped me dead in my tracks, but I just tested it and it works like a charm. So much for Adobe and security. Its always been an oxymoron.

Go into the Install Adobe Flash Player.app/Contents/Info.plist file and add these lines in within the dict array-

<key>NSUIElement</key>
<string>1</string>

This is an age old OS X trick for preventing an app from showing up in the Dock and it still works! Tested under 10.8.2 just now and the install went perfectly silently. No Dock icon and everything is in place- the PrefPane, the Flash Player Install Manager (in Lib/App Support), the Macromedia/mms.cfg file and the plug-ins. :)


Forum|alt.badge.img+18
  • Valued Contributor
  • 1007 replies
  • November 21, 2012

so then to make it not appear in my script. add a line right after syslog('notice', "Installing %s ", join " ", @APPS);
that looks like this
system("defaults write "$installpkg/Contents/Info" NSUIElement 1");

pretty sure that will work i will test and let you know


Forum|alt.badge.img+10
  • New Contributor
  • 343 replies
  • November 21, 2012

Most of these are still relevant:

http://managingosx.wordpress.com/2012/08/17/unattended-installs-of-flash-player-11-3/
http://managingosx.wordpress.com/2012/08/19/more-on-flash-player-11-3/
http://managingosx.wordpress.com/2012/08/20/yet-another-post-on-flash-player-11-3/
http://managingosx.wordpress.com/2012/08/21/new-topic-flash-player-11-4/
http://managingosx.wordpress.com/2012/08/21/im-renaming-this-blog-to-managingflash-wordpress-com/


donmontalvo
Forum|alt.badge.img+36
  • Legendary Contributor
  • 4293 replies
  • November 22, 2012

@mm2270 wrote:

Silent means the user sees nothing.

Silent also means it can be pushed to a logged off Mac.


Forum|alt.badge.img+21
  • Honored Contributor
  • 970 replies
  • November 22, 2012

@mm2270

That's what I do with apps I don't want showing in the dock ;)


Forum|alt.badge.img+9
  • Contributor
  • 104 replies
  • September 13, 2013

Well, bringing this thread back from the dead.

I'm putting the installer into /private/tmp with a policy and then I'm running the command to install. The question I have is; How do I make the installer window disappear and how do I disable the update prompt?


Forum|alt.badge.img+9
  • Contributor
  • 104 replies
  • September 13, 2013

Well, bringing this thread back from the dead.

I'm putting the installer into /private/tmp with a policy and then I'm running the command to install. The question I have is; How do I make the installer window disappear and how do I disable the update prompt?


RobertHammen
Forum|alt.badge.img+28
  • Esteemed Contributor
  • 1027 replies
  • September 13, 2013

Don't mess with the Adobe installer, until they get their beta pkg installer issues sorted out, use the Composer manifest I created, downloadable from:

https://jamfnation.jamfsoftware.com/viewProductFile.html?id=41&fid=662

Cliff's: download and import this into Composer (or, go to File->Update Package Manifests from inside Composer).

Install Flash Player and configure the update settings the way you want them.

In Composer, select New, Pre-Installed Software, and select the "Adobe Flash Player 11.8.800" (don't use any other pre-built Flash Player manifests, whether created by me or by JAMF, as there's an issue with my 11.8.800.94 one that packages the whole /Library/Application Support/Adobe folder). Build as a pkg or a dmg. Use in your workflow (I do across multiple clients, through normal and thin imaging).


Forum|alt.badge.img+9
  • Contributor
  • 104 replies
  • September 16, 2013

Thank you Robert! Worked a lot better than using Adobes #%&! "silent" install.


Forum|alt.badge.img+4
  • Contributor
  • 19 replies
  • March 18, 2014

Robert, I just wanted a add as a new administrator, that kind of got thrown into this role, that was really helpful. Apparently the previous two administrators had been working on this for a while.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings