Can't Kill All Adobe CC 2017 Apps

AdamH
New Contributor II

Before installing Adobe apps, I've typically had a script run that kills all running Adobe Apps... because users don't listen or read.

Normally I've used

ps aux | grep Adobe | grep -v grep | killall Adobe

or

pkill Adobe*

... and its worked very well for years.

But now with the Cc 2017 apps don't respond to this. I get errors like:

pkill: signalling pid 12071: Operation not permitted
pkill: signalling pid 16961: Operation not permitted
pkill: signalling pid 18052: Operation not permitted
pkill: signalling pid 18054: Operation not permitted

or

No matching processes belonging to you were found

I'm seeing this mostly with AfterEffects cc 2017

Any other ways to kill Adobe?

9 REPLIES 9

psg_casper
New Contributor

I think it´s very critical to install adobe apps when the user is working on the machine. I´m caching the adobe installer by casper on the clients and install it when the user logs out or shuts down the computer.

mthakur
Contributor

@AdamH

The error pkill: signalling pid 91: Operation not permitted means the process is running as a different user. The AdobeUpdateDaemon, for example, runs as root.

So try sudo pkill Adobe. That should work in most cases.

Note: You probably don't need an asterisk after the Adobe, since by default pkil and pgrep treat the argument as a pattern.

Example:

$ open /Applications/Adobe Muse CC 2017/Adobe Muse CC 2017.app $ pgrep -l Adobe 54657 Adobe Muse CC 54674 AdobeIPCBroker $ pkill Adobe $ $ pgrep -l Adobe $ <<< Nothing running

Hope this helps.

mthakur
Contributor

@psg_casper

I think it´s very critical to install adobe apps when the user is working on the machine.

Could you explain why? Do the Adobe installers fail when, for example, no user is logged into the console?

(Or did you mean that it's very critical to not install when the user is working?)

psg_casper
New Contributor

In the past I had several problems with installations of adobe apps while the user was actually working with older versions. I ran into installation errors and so I decided for me, that it´s better to install especially adobe programs when no other program is active. It´s working very well and my users are very happy to see a new version when they start the computer the next day. Did I understand you in the right way, that you kill all active adobe programs while the user is working with it? My users would kill ME if I would do something like that.....

AdamH
New Contributor II

These are actually Self Service Adobe installs and updates. I have a big warning telling the user to quit all their Adobe apps before continuing, but many don't or think closing the Photoshop window means they've quit the app. So as a failsafe I like to be sure they are all killed before installing anyway. Most of our users have Laptops, so installing automatically at logout has never worked well since most people don't log out on a regular basis.

So I'm finding that although pkill Adobe is working in most cases (thanks for the no * pointer, I guess I'm just a little old school), it doesn't seem to work on Dreamweaver or AfterEffects even though it LOOKS like the process name has Adobe in it. skill Dream and skill After seems to take care of it.

taugust04
Valued Contributor

Not all of the Adobe processes that run in the background begin with the "Adobe" either. If the Creative Cloud application is installed and running then there may be additional process that need to be killed before Adobe installs can be completed successfully.

May
Contributor III

I made this to run before installation of cached Adobe installers, it works with the user logged in.

Please test test and test again, and also feel free to tell me where my scripting or approach can be improved, so many places i'm sure!
It will only work on 10.11+

#!/bin/sh
#use after Adobe uninstall and before new installation


osversion=$( sw_vers | grep ProductVersion | sed 's/[^0-9]*//' | cut -c1-5 | sed -e 's/.//g' )
LoggedInUser=$( stat -f%Su /dev/console )
LoggedInUID=$(stat -f %u /dev/console)
LoggedInPID=$(ps -axj | awk "/^$LoggedInUser/ && /Dock.app/ {print $2;exit}")


#exit if less than 10.11 or no user logged in
#############################################

if [[ "$osversion" -lt "1011" ]] || [[ $LoggedInUser = "root" ]]; then
echo "exiting script - $osversion - $LoggedInUser"
exit 0
fi


#unload agents and stop user processes
##############
userpid=$( /bin/launchctl asuser "$LoggedInUID" /usr/bin/sudo -iu "$LoggedInUser" "/bin/launchctl list | grep adobe | cut -f1" | tr '
' ' ' )
echo "$userpid"

/bin/launchctl asuser "$LoggedInUID" /usr/bin/sudo -iu "$LoggedInUser" "kill $userpid 2>/dev/null"


echo "unloading all Adobe LaunchAgents"
/bin/launchctl asuser "$LoggedInUID" /usr/bin/sudo -iu "$LoggedInUser" "/bin/launchctl unload /Library/LaunchAgents/com.adobe.* 2>/dev/null"

#unload all Adobe MattDaemons
###################
echo "unloading all Adobe LaunchDaemons"
/bin/launchctl unload /Library/LaunchDaemons/com.adobe.* 2>/dev/null

launchctl stop com.adobe.*
launchctl remove com.adobe.*

#kill all Adobe processes
echo "Stopping Adobe processes"
pgrep obe | xargs kill

Deadzak
New Contributor

Would these same scripts work in ARD? I have been trying to find a unix cmd that will kill adobe apps. As of now the built in Kill ARD script does not work. I did try:

sudo pkill adobe

but it did not work. Any other suggestions? I administer a large amount of lab computers that have CC on them and am constantly needing a way to kill adobe applications. Thanks for all your help.

donmontalvo
Esteemed Contributor II

@AdamH wrote:

So I'm finding that although pkill Adobe is working in most cases (thanks for the no * pointer, I guess I'm just a little old school), it doesn't seem to work on Dreamweaver or AfterEffects even though it LOOKS like the process name has Adobe in it. skill Dream and skill After seems to take care of it.

Here ya go...thanks to @DanGIT:

Dreamweaver:

#!/bin/bash

PROCESSES=("Dreamweaver")

#### Do not edit between these two lines ####

for PROC in "${PROCESSES[@]}"; do
    RUNNING_PROCESSES=$(ps axc | grep -i "$PROC" | awk '{print $1}')
    if [[ $RUNNING_PROCESSES ]]; then
        echo "Found running process $PROC with PID: ${RUNNING_PROCESSES}. Killing it..."
        kill $RUNNING_PROCESSES
    else
        echo "$PROC not found running..."
    fi
done

#### Do not edit between these two lines ####

exit 0

After Effects:

#!/bin/bash

PROCESSES=("After Effects")

#### Do not edit between these two lines ####

for PROC in "${PROCESSES[@]}"; do
    RUNNING_PROCESSES=$(ps axc | grep -i "$PROC" | awk '{print $1}')
    if [[ $RUNNING_PROCESSES ]]; then
        echo "Found running process $PROC with PID: ${RUNNING_PROCESSES}. Killing it..."
        kill $RUNNING_PROCESSES
    else
        echo "$PROC not found running..."
    fi
done

#### Do not edit between these two lines ####

exit 0
--
https://donmontalvo.com