AAMEE packages, DMG format, installPKGfromDMG.sh script...and at imaging time?

donmontalvo
Esteemed Contributor III

JAMF has an excellent article that covers how to deploy AAMEE generated PKG installers by wrapping them in DMGs and using a script to mount/install...JAMF deserves a ROCK-STAR awared for that!!!

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

This works flawlessly when pushing via policy (not sure if HTTP is still an issue when using DMG?), and also Self Service works like a charm.

So what about deploying these DMGs at imaging time? When I pull up the DMG in Casper Admin, I don't see a "run this script" option...

So is it possible to deploy these AAMEE PKG installers that are wrapped in DMG during imaging time?

Happy 4th of July! Applogies to the UK list members...LOL.

Don

--
https://donmontalvo.com
2 ACCEPTED SOLUTIONS

rockpapergoat
Contributor III

that's because casper doesn't know what else to do with the dmg.

you could try using a script to call a policy instead.

i hate that casper forces some of these workarounds that introduce complexity.

View solution in original post

mm2270
Legendary Contributor III

Don, what happens if you assign the DMG to install normally, which will dump the PKG to the root volume as its doing now and then assign the "InstallPKGfromDMG.sh" script to run "At Reboot" from within Casper Admin?

Edit: Taking a quick look a the script in the Resource Kit, it look like this line would need to be edited to work with your existing DMG package-

mountResult=`/usr/bin/hdiutil mount -private -noautoopen -noverify /Library/Application Support/JAMF/Waiting Room/$dmgName -shadow`

That path would need to point to where the PKG is getting dropped during imaging, which is the root of the volume.

Edit 2: OK, I'm an idiot. Even modifying that path won't help because the script is expecting to mount a cached DMG, not just run a PKG install. Sigh. Looks like you're going to need to do some edits to the entire script and save a version specifically for imaging that will just call the dumped PKG at the root of the boot volume with installer.
Bottom line is, this process wasn't designed to be used with imaging, only as a policy.

View solution in original post

14 REPLIES 14

tlarkin
Honored Contributor

Hi Don,

I hope you had a good 4th of July and it wasn't too hot where you are at. Triple digits where I am at, so it is HOT! To address your question, I think the route we should look at is ticking the box in Casper Admin when viewing info about a package that reads, "This package must be installed to the boot volume at imaging time."

If you are using PKGs, you can have a preflight script kick off on your PKG using the built in function apple provides for PKG files.

When you have that box ticked Casper Imaging will add those to the first run script in OS X, and JAMF helper should kick in and the packages should install from there.

I haven't done extensive testing with this because I don't currently have any Adobe CS packages to play around with. So, let me know if that works for you.

Thanks,
Tom

donmontalvo
Esteemed Contributor III

@tlarkin I'm in Burbank this week, and I'm not sure about the weather because my trusty iPhone 4 is being wonky. :)

The DMGs are used only for transport. So the package is actually a PKG sitting in a protective DMG file. If we check the "This package must be installed to the boot volume at imaging time." box, Casper Imaging dumps the AAMEE generated PKG onto the root level of the boot drive.

external image link

--
https://donmontalvo.com

rockpapergoat
Contributor III

that's because casper doesn't know what else to do with the dmg.

you could try using a script to call a policy instead.

i hate that casper forces some of these workarounds that introduce complexity.

tlarkin
Honored Contributor

Negative 4 degrees in LA huh? That actually sounds nice compared to the 103 degrees it is here, hahaha.

So, the AAMEE package installs it to the root of the boot volume and not into /Applications?

That is strange. Let me see if I can get a work flow for you.

Thanks,
Tom

mm2270
Legendary Contributor III

Don, what happens if you assign the DMG to install normally, which will dump the PKG to the root volume as its doing now and then assign the "InstallPKGfromDMG.sh" script to run "At Reboot" from within Casper Admin?

Edit: Taking a quick look a the script in the Resource Kit, it look like this line would need to be edited to work with your existing DMG package-

mountResult=`/usr/bin/hdiutil mount -private -noautoopen -noverify /Library/Application Support/JAMF/Waiting Room/$dmgName -shadow`

That path would need to point to where the PKG is getting dropped during imaging, which is the root of the volume.

Edit 2: OK, I'm an idiot. Even modifying that path won't help because the script is expecting to mount a cached DMG, not just run a PKG install. Sigh. Looks like you're going to need to do some edits to the entire script and save a version specifically for imaging that will just call the dumped PKG at the root of the boot volume with installer.
Bottom line is, this process wasn't designed to be used with imaging, only as a policy.

donmontalvo
Esteemed Contributor III

@mm270 Nail hit squarely on head.

Bottom line is, this process wasn't designed to be used with imaging, only as a policy.

I'm off to file a feature request.

For the time being, I let the Mac imaging guys know to select only the AAMEE packages that are in PKG format from within Casper Imaging.

I'm off to file a feature reqeuest..."Checkbox to mount/install on reboot" for DMGs in JSS.

Thanks,
Don

--
https://donmontalvo.com

donmontalvo
Esteemed Contributor III

@tlarkin Thanks for the feedback, unfortunately the DMGs are not packages, rather they are AAMEE PKG installers wrapped in a DMG to protect them from the evil SMB shares.

I think the route we should look at is ticking the box in Casper Admin when viewing info about a package that reads, "This package must be installed to the boot volume at imaging time."
So, the AAMEE package installs it to the root of the boot volume and not into /Applications?
--
https://donmontalvo.com

mm2270
Legendary Contributor III

@Don, one thing I'm curious about is, are the PKGs AAMEE creates regular old style bundles or are they flat packages? In other words, can you right click on the pkg and choose "Show Contents" or does that option not show up?
I don't have any Adobe software I can test against, so I don't know how the latest AAMEE tool creates them.
If you can do Show Contents, they are not flat packages, and I'm thinking this is at least part of the reason SMB shares can't properly handle them. I was under the impression the flat package format worked better with file servers other than AFP. Maybe I'm wrong about that though.
If that is the case, and I'm correct in my thinking about flat pkgs and SMB shares, you may also want to hit up any contacts at Adobe to get them to update AAMEE in a future version to create flat packages instead. I'm thinking this because the process outlined by JAMF above seems designed to work around a bundle style pkg and present a single file to the SMB server instead.

donmontalvo
Esteemed Contributor III

@mm2270 Unfortunately the AAMEE generated PKG installers are way too complex for the flat package format to be an option. These are standard PKG format bundles (can see contents). If they were flat, there wouldn't be a problem with SMB shares (aliases breaking within the PKG).

I'm sending Jody (Adobe) a link to this thread to see if an engineer can respond.

Don

--
https://donmontalvo.com

bsuggett
Contributor II

Hi Everyone,

I've not tested this but something I just thought but in theory gets the job done @ imaging time. (A bit of double handling)

Don, create your pkg with AAMEE, create your container dmg, put it into the directory where policies cache packages. Now using composer, drag that folder into composer to create a new package. This will add the complete directory path and the DMG to your package within a package. Build the DMG and upload to Casper admin. Modify a pkgfromdmg.sh script and hardcode your values that would be defined in the policy parameters. Add your new pkgfromdmg.sh to Casper Admin and set it to run @ reboot. Add your new DMG and script to your configuration and run casper imaging.

In theory this will emulate the "Cache" package setting of a policy in Casper Imaging. Then when the computer reboots the script will install the PKG from the DMG.

Again not a very elegant solution nor is it actually installing the applications @ imaging time... It's something....

Poseiden951
Contributor

@donmontalvo

Ever find a better way than @mm2270's method? I'm currently attempting the same thing mm2270 tried.

donmontalvo
Esteemed Contributor III

@Suggett This is an old thread, a lot has changed in the last 3 or so years. I'd search for more current threads that would be more relevant to newer OS and Adobe versions.

@Poseiden951 Thinking back, we ended up deploying via policy, apologies for not closing this thread back in 2012.

Don

--
https://donmontalvo.com

Poseiden951
Contributor

@donmontalvo

Surprisingly, dropping the Adobe CC packaged app into Casper Admin worked just fine. It installed during imaging with no issues.

RobertHammen
Valued Contributor II

Yeah, Casper Admin will now ZIP non-flat PKG files when copying them to your CasperShare. Since it does this, no need to create a DMG or use this script, which hasn't worked well for awhile (lot of JAMF's scripts have broken with Casper 9 or Yosemite and many of them haven't been updated. In this use case, there probably isn't a need).

Some notes and tips on packaging items from @foigus' blog (although they are more generic, not a Casper user):

https://foigus.wordpress.com/2014/12/05/packaging-adobe-cc-2014-applications/