Link to home
Start Free TrialLog in
Avatar of Mack
MackFlag for United States of America

asked on

SCCM 2012 R2 - how to kill program if running, before deployment

Hi Guru's, I have SCCM 2012 R2 serving 14,200 clients. I'm rolling an an Adobe package, but I need to make sure it's not running before installation begins. How would I do something like that? (For .exe in general.)? Basically I need to kill the processes before installation starts.

Thank you for your excellent assistance!
Avatar of Lofty Worm
Lofty Worm
Flag of United States of America image

This looks like a regular command thing.  Use pslist, sc or psexec to serach and kill the process, and build it in to you SCCM push.

I read through this and is sounds like what you are trying to do.
http://www.74k.org/sccm-using-global-conditions-pstools
Hi,

The standard way of dealing with this is supersedence: this is where you get SCCM to uninstall an old version of X install a new version instead. The uninstall, if written correctly will prompt the user to quit the app, or will quit for them. For adobe it's safe enough as the user will only be reading.

Checkout the TechNet page: https://technet.microsoft.com/en-us/library/gg682011.aspx

The exact question you asked if more about how to do a "brute force kill" of an application that is running. You can use psexec etc. but that's a pain, as you need it on the machine (which is risky) or run it before running the uninstall which means you now need a task-sequence to handle the logic/flow.

If I were you I would use PowerShell and the good news is that you don't have write your own script - it's been done for you already: http://psappdeploytoolkit.com/.

This handles closing apps and has a professional looking GUI too.

Mike
Avatar of Mack

ASKER

Sorry to you both. I didn't phrase my question correctly.

I do know how to kill a program. It's best to use the Windows built-in tools, rather than a third party. I always use taskkill.

What we need help on is how to build that command in SCCM deployment of an .exe? Where would I put that command, exactly?

-Bret
ASKER CERTIFIED SOLUTION
Avatar of Mike Taylor
Mike Taylor
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial