How to find/kill running process BEFORE installing a pkg?

donmontalvo
Esteemed Contributor III

Is there a way for Casper to kill a running process BEFORE installing a pkg? I see the option but wondered if this runs BEFORE the pkg is installed?

Management > Computer Management > Policies > Create New Policy > Advanced > Files & Processes > Search for Processes [processname] [x] Kill if found

I searched the Casper Admin PDF, did a search for "Kill" and for "Search for Process" but came up dry.

Thanks,
Don

--
https://donmontalvo.com
8 REPLIES 8

ernstcs
Contributor III

I actually don't know the order either for this particular option, but an
easy test should tell you. =)

If a policy is any indication, the plan says it will perform your installs
first and then check for processes afterwards. You'll likely need to run a
script before to kill it first.

This brings up my issue again with not having as much control on the order
of things in policies which ends up creating more script work have the time
for simple commands.

Craig E

Not applicable

making a simple one line script and setting it to "run before" has worked for me.

Most of the installs available via SelfService are setup to first kill the existing app.

Nick Caro Senior Desktop Support Administrator

cartern
New Contributor

I used this for Adobe since all Adobe apps must be quit before install.

kill $(pgrep Adobe)

That took care of all versions of Illustrator and Photoshop. Be careful with what you type in the place of Adobe so you don't kill an important process. I just set it in a script and ran it before install.

donmontalvo
Esteemed Contributor III

Wow, there's an old thread. :)

Typically we push AAMEE packages out to logged off Macs, to prevent any risk of disruption.

Don

--
https://donmontalvo.com

Snickasaurus
Contributor

One of the great things about this OS being built on some *nix freshness is there are so many ways, command line wise, to get a job done. Learn something new all the time!

jarednichols
Honored Contributor
KILL -9 0

should do it.

donmontalvo
Esteemed Contributor III

@jarednichols wrote:

KILL -9 0
should do it.

LOL

--
https://donmontalvo.com

donmontalvo
Esteemed Contributor III

@cartern wrote:

I used this for Adobe since all Adobe apps must be quit before install. kill $(pgrep Adobe) That took care of all versions of Illustrator and Photoshop. Be careful with what you type in the place of Adobe so you don't kill an important process. I just set it in a script and ran it before install.

The thread that won't die...haha...recently used @cartern's tip to kill a Polycom process.

Works fine, hope this helps the next person:

kill `pgrep PPCIP`
--
https://donmontalvo.com