locked
How to block an executable or process from running during a Task Sequence deployment RRS feed

  • Question

  • Hi,

    Is it possible for when a task sequence is running, whether there is any options to block an .exe or a process from running during the deployment, i.e - Outlook.exe?

    The task sequence has several steps which uninstalls/installs software but there is a requirement for Outlook.exe to be closed during the entire task sequence.

    Any suggestions would be great!

    Thanks

    Craig


    MCTS | MCITP | MCSA

    Friday, February 28, 2014 10:55 AM

Answers

  • Would this stop the .exe/process from being re-launched or does it just kill the .exe/process before the task sequence/program starts?

    Thanks


    MCTS | MCITP | MCSA

    That would just kill the process and NOT prevent it from being restarted. Also, I can imagen a few users getting pretty angry if IT started killing their applications during business hours. I know I would be if someone killed Outlook when I wrote a long email :)

    You can take a look at http://psappdeploytoolkit.codeplex.com/ for a more humane way to do it. Also, if you have the license you could perhaps use "temporary" AppLocker rules to block Outlook.exe from being started during the installation. Its a bit of work but it could be a working solution.

    /Tim


    Tim Nilimaa | Blog: http://infoworks.tv | Twitter: @timnilimaa

    • Proposed as answer by Joyce L Monday, March 3, 2014 2:28 AM
    • Marked as answer by Joyce L Monday, March 3, 2014 10:40 AM
    Friday, February 28, 2014 12:15 PM
  • Is it possible for when a task sequence is running, whether there is any options to block an .exe or a process from running during the deployment, i.e - Outlook.exe?

    No, there's nothing built in that can do that.

    Torsten Meringer | http://www.mssccmfaq.de

    • Marked as answer by Joyce L Monday, March 3, 2014 10:40 AM
    Friday, February 28, 2014 11:11 AM
  • That's not to say it can;t be done though :-) As with most things, with enough time, knowledge, and skill you could come up with something (WMI Eventing would be a path to let you accomplish this), but is it truly worth the effort?

    The kit that Tim pointed above is a great wrapper for deploying apps that addresses most (if not all) of the challenge by killing open tasks and informing users of what's going on.


    Jason | http://blog.configmgrftw.com

    • Marked as answer by Joyce L Monday, March 3, 2014 10:40 AM
    Friday, February 28, 2014 2:00 PM

All replies

  • Are you deploying software with task sequence? Why don't you use the application model instead?

    You could wrap your installer in to a script which first calls "taskkill /IM outlook.exe /F" to force the Outlook process to be terminated. You could also use this tool: http://blog.coretech.dk/kea/new-version-of-the-coretech-shutdown-tool/


    • Proposed as answer by Narcoticoo Friday, February 28, 2014 11:05 AM
    • Edited by Narcoticoo Friday, February 28, 2014 11:07 AM
    Friday, February 28, 2014 11:05 AM
  • Is it possible for when a task sequence is running, whether there is any options to block an .exe or a process from running during the deployment, i.e - Outlook.exe?

    No, there's nothing built in that can do that.

    Torsten Meringer | http://www.mssccmfaq.de

    • Marked as answer by Joyce L Monday, March 3, 2014 10:40 AM
    Friday, February 28, 2014 11:11 AM
  • I thought so - thanks anyway Torsten!

    MCTS | MCITP | MCSA

    Friday, February 28, 2014 11:53 AM
  • Would this stop the .exe/process from being re-launched or does it just kill the .exe/process before the task sequence/program starts?

    Thanks


    MCTS | MCITP | MCSA

    Friday, February 28, 2014 11:54 AM
  • Like I said, I'd wrap the taskkill command to your application install command (script). Or I'd use the tool I posted. This way the process would be killed before the actual application installation.

    Friday, February 28, 2014 11:59 AM
  • Would this stop the .exe/process from being re-launched or does it just kill the .exe/process before the task sequence/program starts?

    Thanks


    MCTS | MCITP | MCSA

    That would just kill the process and NOT prevent it from being restarted. Also, I can imagen a few users getting pretty angry if IT started killing their applications during business hours. I know I would be if someone killed Outlook when I wrote a long email :)

    You can take a look at http://psappdeploytoolkit.codeplex.com/ for a more humane way to do it. Also, if you have the license you could perhaps use "temporary" AppLocker rules to block Outlook.exe from being started during the installation. Its a bit of work but it could be a working solution.

    /Tim


    Tim Nilimaa | Blog: http://infoworks.tv | Twitter: @timnilimaa

    • Proposed as answer by Joyce L Monday, March 3, 2014 2:28 AM
    • Marked as answer by Joyce L Monday, March 3, 2014 10:40 AM
    Friday, February 28, 2014 12:15 PM
  • That's not to say it can;t be done though :-) As with most things, with enough time, knowledge, and skill you could come up with something (WMI Eventing would be a path to let you accomplish this), but is it truly worth the effort?

    The kit that Tim pointed above is a great wrapper for deploying apps that addresses most (if not all) of the challenge by killing open tasks and informing users of what's going on.


    Jason | http://blog.configmgrftw.com

    • Marked as answer by Joyce L Monday, March 3, 2014 10:40 AM
    Friday, February 28, 2014 2:00 PM
  • Thanks Tim - I have been testing this toolkit and first impressions looked good!

    Although, unfortunately you cannot execute a package/program in a task sequence with user interaction. Do you know if its possible to execute multiple packages/programs (like a task sequence) using this toolkit? Then I could use the interaction feature!

    Craig


    MCTS | MCITP | MCSA

    Friday, February 28, 2014 5:07 PM