Creative Cloud installs... how to kill all conflicting processes

ooshnoo
Valued Contributor

Peeps...

The latest version of Adobe's Creative Cloud Packager no longer includes the option to ignore possible conflicting processes before installatoin. Instead, Adobe has provided a list..an incomplete list...of such processes:

https://helpx.adobe.com/creative-cloud/packager/resolving-process-conflicts.html

Does anyone know of a good way to kill all those processes..if they're running...before the CC install starts? I'm sure it could be scripted, but how exactly?

4 REPLIES 4

endor-moon
Contributor II

Perhaps you can script it so the script only runs if no one is logged in.

#!/bin/sh

# Abort operation if someone is logged in.

    if [ `who | grep -c console` != "0" ]
    then
        echo "Someone is logged in at the console."
        echo "Aborting script."
        exit 0
    fi

ooshnoo
Valued Contributor

Thanks for the idea, but we only deploy CC apps via Self Service, so unfortunately that is not an option for us.

bpavlov
Honored Contributor

You most definitely do not want to kill those Adobe processes. That would imply an Adobe application is running and someone is working in it. The approach I took at my previous job was to make self service items that ran a script. The script would check for all Adobe processes and warn the user to close it before they could proceed. It does a few other things too like check that the computer has sufficient space and is plugged into power. Once the script goes through all its checks, if the Adobe processes are not running it will then call a custom trigger (a second policy that actually has the Adobe installer). That second policy that it calls should have a custom trigger name obviously, have the installer, and also do an inventory update.

The parameters you would need to fill out are as follows:
Parameter 4: Needed Free Space (e.g. 10) (calculated in GB)
Parameter 5: Application Name (eg. Great Big Title)
Parameter 6: Estimated Time to completion in minutes
Parameter 7 - 11: custom trigger names

#!/bin/bash

available_free_space=$(df -g / | tail -1 | awk '{print $4}')
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
needed_free_space="$4"
app_name="$5"
Time="$6"
PowerSource=$(pmset -g ps | grep "Battery Power")

CustomTriggerPolicyName1="$7"
CustomTriggerPolicyName2="$8"
CustomTriggerPolicyName3="$9"
CustomTriggerPolicyName4="${10}"
CustomTriggerPolicyName5="${11}"

insufficient_free_space_for_install_dialog="Your boot drive must have $needed_free_space gigabytes of free space available in order to install $app_name using Self Service. It has $available_free_space gigabytes available. If you need assistance with freeing up space, please contact the Help Desk."
adequate_free_space_for_install_dialog="$app_name may take at least $Time minutes to download and prepare for installation. Please be patient and do not restart/shutdown. Once the download is complete, the installation process will start. Press OK to continue."
no_ac_power="The computer is currently running off battery and is not plugged into a power source. Please plug the computer into a power source and try again."

if [ "$PowerSource" = "Now drawing from 'Battery Power'" ]; then
   jamf displayMessage -message "$no_ac_power"
   /bin/echo "$no_ac_power"
   exit 0
fi

if [[ "$available_free_space" -lt "$needed_free_space" ]]; then
    jamf displayMessage -message "$insufficient_free_space_for_install_dialog"
    /bin/echo "$insufficient_free_space_for_install_dialog"
fi

#List of Adobe application processes in an array
adobe_process_list=("Adobe Animate CC 2015" "Adobe Audition CC 2014" "Adobe Audition CC 2015" "Adobe Bridge CC" "Adobe Edge Animate CC 2014.1" "Adobe Edge Animate CC 2015" "Adobe Edge Reflow CC" "Adobe Extension Manager CC" "Adobe Extension Manager CS6" "Adobe Fireworks CS6" "Adobe Flash Builder 4.7" "Adobe Flash CC 2014" "Adobe Illustrator" "Adobe InCopy CC 2014" "Adobe InCopy CC 2015" "Adobe InDesign CC 2014" "Adobe InDesign CC 2015" "Adobe Lightroom" "Adobe Media Encoder CC 2014" "Adobe Media Encoder CC 2015" "Adobe Muse CC" "Adobe Photoshop CC 2014" "Adobe Photoshop CC 2015" "Adobe Photoshop Lightroom 5" "Adobe Prelude CC 2014" "Adobe Prelude CC 2015" "Adobe Premiere Pro CC 2014" "Adobe Premiere Pro CC 2015" "AdobeAcrobat" "After Effects" "Character Animator" "Dreamweaver" "EdgeCode" "EdgeInspect" "ExtendScript Toolkit" "Fuse" "Scout" "sgmacosx" "SpeedGrade" "Adobe XD")

#Function to check if the process is running 
process_check () {
if [ "$(ps axc | grep $1)" ]; then
    /bin/echo "$1 is running. Cannot continue with installation."
    jamf displayMessage -message "$1 is currently running. Please quit all Adobe apps and try again. If you've closed all Adobe apps and you continue to see this message, attempt a restart or submit a request for assistance via the Help Desk."
    exit 1
fi
}

IFS=""
for i in ${adobe_process_list[@]}; do
    process_check "${i}"
done

if [[ "$available_free_space" -ge "$needed_free_space" ]]; then
    /bin/echo "$available_free_space gigabytes found as free space on boot drive. Proceeding with install."

    jamf displayMessage -message "$adequate_free_space_for_install_dialog"

    if [ -n "$CustomTriggerPolicyName1" ]; then
       jamf policy -event "$CustomTriggerPolicyName1" -verbose -randomDelaySeconds 0
    fi

    if [ -n "$CustomTriggerPolicyName2" ]; then
       jamf policy -event "$CustomTriggerPolicyName2" -verbose -randomDelaySeconds 0
    fi

    if [ -n "$CustomTriggerPolicyName3" ]; then
       jamf policy -event "$CustomTriggerPolicyName3" -verbose -randomDelaySeconds 0
    fi

    if [ -n "$CustomTriggerPolicyName4" ]; then
       jamf policy -event "$CustomTriggerPolicyName4" -verbose -randomDelaySeconds 0
    fi

    if [ -n "$CustomTriggerPolicyName5" ]; then
       jamf policy -event "$CustomTriggerPolicyName5" -verbose -randomDelaySeconds 0
    fi

fi

exit 0

ooshnoo
Valued Contributor

Wow. Thanks @bpavlov This looks great. Will definitely get testing on it. Thanks for sharing!