rdefino
asked on
Need sccm task to check for running process or install app
I have to setup a task to run if a particular application or process is installed. Is it possible to configure a task to check for a process or install application? Is so, how is it done?
ASKER
How would I do it a vb script in sccm 2012?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The package launches the script which uses WMI to check for the running process and from there makes the decision whether or not to do the next thing.
For a more complex example, I've done packages where an app needs to be upgraded but the user might be running it. If it's not running, the script does the upgrade by calling the executable and passing silent parameters. If the task is already running then it alerts the user, asking them to close the app at their convenience. It then rechecks every ten seconds to see if it can run the upgrade and then afterwards tells the user all is OK. I also did one that would remind the user every ten minutes if they ignored the request.
Of course there's always at least one user who closes the app and then shuts down, breaking the scripts flow - unless you have a re-run package on failure set to try again on next boot.