Posted on 05-12-2016 10:44 AM
Hello All,
I have been trying to deploy Adobe Creative Cloud updates to our Mac clients with no luck. I have followed the packaging and deployment instructions from the following discussion (https://jamfnation.jamfsoftware.com/article.html?id=161). However, I am not sure if the script that I am using is the most up-to-date one or if anyone else has figured out how to get this to work.
I have been able to package the updates in a DMG file as instructed but I am running into issues with the script.
Here is the script that I am running (installPKGfromDMG.sh):
#!/bin/sh
####################################################################################################
#
# Copyright (c) 2011, JAMF Software, LLC. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the JAMF Software, LLC nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY JAMF SOFTWARE, LLC "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL JAMF SOFTWARE, LLC BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#####################################################################################################
#
# SUPPORT FOR THIS PROGRAM
#
# This program is distributed "as is" by JAMF Software, LLC's Resource Kit team. For more
# information or support for the Resource Kit, please utilize the following resources:
#
# http://list.jamfsoftware.com/mailman/listinfo/resourcekit
#
# http://www.jamfsoftware.com/support/resource-kit
#
# Please reference our SLA for information regarding support of this application:
#
# http://www.jamfsoftware.com/support/resource-kit-sla
#
#####################################################################################################
#
# ABOUT THIS PROGRAM
#
# NAME
# installPKGfromDMG.sh -- Install a PKG wrapped inside a DMG
#
# SYNOPSIS
# sudo installPKGfromDMG.sh
#
# DESCRIPTION
# This script will mount a DMG and install a PKG file wrapped inside. The script assumes that
# the DMG has been previously cached to the machine to:
#
# /Library/Application Support/JAMF/Waiting Room/
#
# This is the default location that a package will be cached to when selecting the "Cache"
# option within a policy or Casper Remote.
#
# To use this script, please follow the following workflow:
#
# Step 1: Wrap a PKG inside a DMG
# 1. Open Disk Utility. # 2. Navigate to File > New > Disk Image from Folder. # 3. Select the PKG and click the Image button. # 4. Name the package after the original PKG. # 5. Choose a location for the package and then click Save. #
# Step 2: Upload the DMG and installPKGfromDMG.sh script to Casper Admin:
# 1. Open Casper Admin and authenticate.
# 2. Drag the DMG you created in the previous procedure to the Package pane in Casper Admin. # 3. Drag the installPKGfromDMG.sh script to the Package pane in Casper Admin. # 4. Save your changes and quit the application. #
# Step 3: Create a policy to install the DMG:
# 1. Log in to the JSS with a web browser.
# 2. Click the Management tab.
# 3. Click the Policies link.
# 4. Click the Create Policy button.
# 5. Select the Create policy manually option and click Continue.
# 6. Configure the options on the General and Scope panes as needed. # 7. Click the Packages button, and then click the Add Package link. # 8. Across from DMG, choose “Cache” from the Action pop-up menu and then click the
# "Add Packages" button.
# 9. Click the Scripts button, and then click the Add Script link.
# 10. Across from the installPKGfromDMG.sh script, choose “Run After” from the Action pop-up menu.
# 11. Enter the name of the original PKG in the Parameter 4 field. # Note: You must enter the exact name of the PKG in the Parameter 4 field. If you need
# to verify the name of the PKG, you can mount the DMG that it is wrapped inside. # 12. Click Save.
#
####################################################################################################
#
# HISTORY
#
# Version: 1.0
#
# - Created by Nick Amundsen on July 22, 2011
#
####################################################################################################
#
# DEFINE VARIABLES & READ IN PARAMETERS
#
#####################################################################################################
#
# HARDCODED VALUES SET HERE
#
# Variables set by Casper - To manually override, remove the comment for the given variable
# targetDrive="" # Casper will pass this parameter as "Target Drive" if left commented out
# computerName="" # Casper will pass this parameter as "Computer Name" if left commented out
# userName="" # Casper will pass this parameter as "User Name" if left commented out. Usernames
# can only be passed if the script is triggered at login, logout, or by Self Service
# Variables used for logging
logFile="/private/var/log/installPKGfromDMG.log"
# Variables used by this script.
dmgName=""
# CHECK TO SEE IF A VALUE WERE PASSED IN FOR PARAMETERS AND ASSIGN THEM
if [ "$1" != "" ] && [ "$targetDrive" == "" ]; then
targetDrive="$1"
fi
if [ "$2" != "" ] && [ "$computerName" == "" ]; then
computerName="$2"
fi
if [ "$3" != "" ] && [ "$userName" == "" ]; then
userName="$3"
fi
if [ "$4" != "" ] && [ "$dmgName" == "" ]; then
dmgName="$4"
fi
####################################################################################################
#
# LOGGING FUNCTION
#
####################################################################################################
log () {
echo $1
echo $(date "+%Y-%m-%d %H:%M:%S: ") $1 >> $logFile
}
####################################################################################################
#
# VARIABLE VERIFICATION FUNCTION
#
####################################################################################################
verifyVariable () {
eval variableValue=$$1
if [ "$variableValue" != "" ]; then
echo "Variable "$1" value is set to: $variableValue"
else
echo "Variable "$1" is blank. Please assign a value to the variable."
exit 1
fi
}
####################################################################################################
#
# SCRIPT CONTENTS - DO NOT MODIFY BELOW THIS LINE
#
####################################################################################################
# Verify Variables
verifyVariable dmgName
# Mount the DMG
log "Mounting the DMG $dmgName..."
mountResult=`/usr/bin/hdiutil mount -private -noautoopen -noverify /Library/Application Support/JAMF/Waiting Room/$dmgName -shadow`
mountVolume=`echo "$mountResult" | grep Volumes | awk '{print $3}'`
mountDevice=`echo "$mountResult" | grep disk | head -1 | awk '{print $1}'`
if [ $? == 0 ]; then
log " DMG mounted successfully as volume $mountVolume on device $mountDevice."
else
log "There was an error mounting the DMG. Exit Code: $?"
fi
# Find the PKG in the DMG
packageName=`ls $mountVolume | grep "pkg"`
# Install the PKG wrapped inside the DMG
log "Installing Package $packageName from mount path $mountVolume..."
/usr/sbin/jamf install -path $mountVolume -package $packageName
if [ $? == 0 ]; then
log " Package successfully installed."
else
log "There was an error installing the package. Exit Code: $?"
fi
# Unmount the DMG
echo "Unmounting disk $mountDevice..."
hdiutil detach "$mountDevice" -force
# Delete the DMG
/bin/rm /Library/Application Support/JAMF/Waiting Room/$dmgName
After uploading the script I then added the name of the package in Parameter 4 as instructed:
ACCUP50416.dmg
When running the policy on one of my Macs I am presented with the following error:
Would anyone have any idea on how to get this to work or what I am doing wrong?
Thank-you,
Anthony)
Posted on 05-12-2016 11:02 AM
The binary path changed in 9.8+ to /usr/local/bin/jamf.
I haven't been admining long enough to know the real woes of the pkg from dmg issues, but as of the current CC apps, I've not had any issues with the Creative Cloud Repackager,
Posted on 05-12-2016 11:09 AM
Since the change of all the binary paths are wrong in the script then. I will try to change them and re-upload the script to see if that makes a difference. Thanks for the suggestion.
How are you deploying CC updates after using Creative Cloud Packager to package the updates from Adobe?
Posted on 05-12-2016 11:28 AM
Check out Adobe's "Remote Update Manager". I've had mixed results, but they have include options for running a local update server.
Posted on 05-12-2016 11:39 AM
I have attempted to configure the local update server before. I even called and spoke with Adobe on configuring the server and the technician informed me that enterprise users are not even using the local server for whatever reason. Honestly with all the issues I have been having with Adobe and CC I can understand why.
I will look into the Remote tool though. Thanks!
Posted on 05-12-2016 12:23 PM
I've been using RemoteUpdateManager via a script I wrote and put in Self Service and even though it isn't perfect, it isn't bad. I find that sometimes when updates fail to install, simply running it again lets it work. Sometimes restarting the computer and running it again is needed. And in the worse cases, you have to wait a few days before rebooting and running it again will install all the awaiting updates. It seems that the weakest link in the chain will always be Adobe's servers and software. This script just makes it easier for non-admin users to apply updates themselves with a single click.
I have one policy that installs RemoteUpdateManager into /usr/local/bin/ onto Macs that have CC installed, and then a separate policy that contains this script: (I don't know why jamfnation is bungling the formatting of one section, but as long as you copy/paste into TextWrangler, it should be OK.)
#!/bin/sh
# must be run as root or via JSS which runs scripts as root
# Requires that RemoteUpdateManager be installed in /usr/local/bin/
# creates a log file and starts it off with a date/time stamp.
# You can choose to put the log file where you want. This was convenient for me.
date > /var/log/CC_Update.log
# appends an informative header to the log file
echo "-----------------------------------------------
This installation may take 10-15 minutes even though there may not be any signs of activity.
Please be patient. If you don't see any activity, click the Reload button above and check Self Service to see if the task is still running.
" >> /var/log/CC_Update.log
# opens the file with Console.app (or whatever is set as the default app for .log files)
open /var/log/CC_Update.log
# a vocal notice to the user letting them know this may take a while
osascript -e "set Volume 3"
say -v Alex "This may take a while. Please stand by."
# runs the commandline component of the Creative Cloud updater and pipes the output
# to the log file as well as standard output so it shows up in jamf logs
/usr/local/bin/RemoteUpdateManager 2>&1 | tee -a /var/log/CC_Update.log
#### this command ONLY checks for updates. it does not actually install anything. Keep this
#### in the script for testing purposes.
# /usr/local/bin/RemoteUpdateManager --action=list 2>&1 | tee -a /var/log/CC_Update.log
# below checks the last line of the log file for a successful execution. If exit code = 0
# then either the updates installed or it is already up to date and the computer will say so.
# If exit code != 0 then a vocal notice will alert the user that something failed.
if tail -1 /var/log/CC_Update.log | grep "(0)"
then osascript -e "set Volume 4"
say -v Alex "Your Creative Cloud programs are up to date"
elif tail -1 /var/log/CC_Update.log | grep "(1)"
then osascript -e "set Volume 5"
say -v Alex "An error type 1 has occurred. Please notify your friendly neighborhood Mac Engineer."
elif tail -1 /var/log/CC_Update.log | grep "(2)"
then osascript -e "set Volume 5"
say -v Alex "An error type 2 has occurred. Please notify your friendly neighborhood Mac Engineer."
else
osascript -e "set Volume 5"
say -v Alex "An unknown error may have occurred."
fi
Posted on 05-12-2016 10:33 PM
I setup an internal Adobe Update server a little while ago. I found it much easier to run a terminal command to update Adobe products than to package the updates up and push them out via a policy!
This video helped me out a lot.
http://tv.adobe.com/watch/creative-cloud-for-enterprise/set-up-an-internal-adobe-update-server-by-us...
Posted on 05-13-2016 02:25 AM
Likewise setup an internal Adobe Update Server, Simple and fast...
Then use Adobe Remote Update Manager.
You can then run the 'RemoteUpdateManager' command from say, ARD and this will check and install updates.
https://helpx.adobe.com/creative-cloud/packager/update-server-setup-tool.html
http://www.adobe.com/content/dam/Adobe/en/devnet/creativesuite/pdfs/AdobeRemoteUpdateManager.pdf
cheers
Posted on 05-13-2016 12:58 PM
@stevevalle and @kerouak I have tried to setup an Adobe Update Server on a Windows Server using IIS with no luck. When I called Adobe the technician told me that he did not know how to configure the server with IIS even though it is possible. Would anyone have instructions here that work with a Windows Server using IIS?
I have referenced this before but he uses Apache and the instructions start to change at the end.
https://forums.adobe.com/thread/1363686
Thanks,
Anthony
Posted on 05-14-2016 12:29 AM
you dont necessarily need to setup an internal server mate, You can use it with adobes.
if you want info on the internal, ill send you something monday when im back at work.. gluck
Posted on 05-15-2016 04:38 PM
@apanages I have a Mac setup for Adobe updates which also serves as an Apple Software Update server.
Maybe this link will help!
@kerouak True, you don't need to setup an internal server for this. But I would much rather download updates internally than to hit an external server and download the same update multiple times.
Posted on 05-16-2016 06:24 AM
@apanages I've setup AUSST under IIS several times. What issue are you having?
Posted on 05-16-2016 07:16 AM
Ideally we would like to download the updates once then have them available on our network instead of all of our users pinging Adobe for them.
@kerouak that would be awesome!
@thoule I am using this guide from Adobe https://helpx.adobe.com/creative-cloud/packager/update-server-setup-tool.html. I am able to synchronize with the Adobe Update Server after running the setup on my Windows Server, but the issues I am having are with the Setting up IIS 8.5 section. I ran through those steps and did everything that they instructed but I don't know what to do after I restart the website and run AUSST. The instructions get very vague after that point and that's when I called Adobe but they were not able to help.
Thank-you everyone for jumping in, I really appreciate the support from this community!
Posted on 05-16-2016 07:27 AM
@apanages That's the guide I followed and it worked great. You need to find out what's wrong, so your best bet is to try things manually to identify the problem.
Is IIS Running?
Can you download https://yoursever.com/Path/webfeed/oobe/aam10/mac/updaterfeed.xml (where Path is any path you added to the root of your server)?
Posted on 05-16-2016 08:32 AM
@thoule I followed the path you provided (changing 'Path' of course) and I was give the following error message:
I created a test document in the same folder to make sure I was able to reach that destination as well. But this message is what I get when I navigate to the updater feed.xml file.
Any thoughts?
Posted on 05-16-2016 09:14 AM
@apanages Is there any data in that document? You should be able to browse to it and see what it looks like. You said you could view an HTML doc in that same directory?
If empty: AdobeUpdateServerSetupTool is not running properly.
If not empty: IIS may not be configured correctly/fully. Did you add the mime types as required? IIS may not know how to handle .xml files.
Posted on 05-16-2016 11:06 AM
@apanges
Busy today mate, I'll post u tomorrow mate!
Posted on 05-16-2016 01:13 PM
@thoule It appears that after I rebuilt my server I forgot to add the extension types. So I proceeded with the following:
Launched Server Manager
Tools > IIS Manager
Click on my server on the left pane.
Double clicked on Handler Mappings
Clicked Add Module Mapping and created one for each of the extensions:
Under my server I clicked on Application Pools and made my DefaultAppPool (Classic).
I then navigated to (C:WindowsMicrosoft.NETFrameworkv4.0.30319Config) and added the following lines to the web.config file.
<add path="*.xml" verb="*" type="System.Web.HttpMethodNotAllowedHandler" />
<add path="*.zip" verb="*" type="System.Web.HttpMethodNotAllowedHandler" />
<add path="*.dmg" verb="*" type="System.Web.HttpMethodNotAllowedHandler" />
<add path="*.sig" verb="*" type="System.Web.HttpMethodNotAllowedHandler" />
<add path="*.crl" verb="*" type="System.Web.HttpMethodNotAllowedHandler" />
Now when I navigate to (https://yoursever.com/Path/webfeed/oobe/aam10/mac/updaterfeed.xml) I get a 505 Server Error.
I was able to browse to an HTML file that I placed in there prior to making these changes. Now its not working. As far as the updater feed.xml, there is data inside the file.
Any thoughts?
Posted on 05-16-2016 01:31 PM
This error is certainly a filetype error. IIS doesn't know how to handle XML.
This method is a little different than what I did. I just right clicked on my server in "Server Manager" and choose "Internet Information Services (IIS) Manager. Then in the IIS Manager, I clicked "MIME Types" and added (top right, add) an entry for each type (zip, xml, crl, dmg, and sig).
But back to what you've done and the documentation. Differences between the documentation and what you've done: I see under Request Path, you have '*.zip'. In the documentation, there is no asterisk.
It also looks like you are adding a Script Map and not a Module Map. See (https://helpx.adobe.com/content/help/en/creative-cloud/packager/update-server-setup-tool.html#main-pars_header_34).
HTH -t-
Posted on 05-17-2016 01:35 PM
@thoule would you have a screenshot of what the updaterfeed.xml should like when navigating to it through a webbrowser?
Posted on 05-17-2016 01:44 PM
Web browser can't parse the xml so it throws this error. Which is fine because it means it found it.
XML Parsing Error: syntax error
Location: http://server/path/webfeed/oobe/aam20/mac/updaterfeed.xml
Line Number 1, Column 1:0001
^
If I use curl command line, then I can see the XML output.
525054-MITLL:tmp to26409$ curl http://server/path/webfeed/oobe/aam20/mac/updaterfeed.xml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<!-- FileName: index.html
Language: [en]
-->
<!--Head-->
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>McAfee Web Gateway - Notification</title>
<script src="/mwg-internal/de5fs23hu73ds/files/javascript/sw.js" type="text/javascript" ></script>
<link rel="stylesheet" href="/mwg-internal/de5fs23hu73ds/files/default/stylesheet.css" />
</head>
<!--/Head-->
...and so on
Posted on 05-17-2016 01:50 PM
So then this should be fine then?
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
Invalid at the top level of the document. Error processing resource 'http://serverPath/adobeupdates/webfeed/oobe/...
0054
^
Posted on 05-17-2016 02:12 PM
That means that URL is valid and you are downloading an XML file. Move on to testing RUM. Run RUM and look in your IIS logs to see if it's connecting.