Deploy only if a process is not in memory

I have a Word macro package that cannot be installed if Word is open. People tend not to close Word when they leave for the night and even if I ask them to do it I don't know if they will and the install will fail and break the macros if the install runs and Word is open.  Is there a way to base a deployment if a process (Winword.exe) is not in memory. I can probably accomplish this with a script but I am trying to avoid having to create lots of scripts.





Date Votes
  • Hi Len,

    Use a Command step in your PDQ Package. Have the only Success Code be a 1. (remove the 0) 

    %WINDIR%\System32\tasklist /FI "IMAGENAME eq winword.exe" | find /I /N "winword.exe"

    Check if process is running.png


    Make sure you have your option on Step 1 to "Stop Deployment if this Step fails"

    PDQ Deploy Package Options.png

  • Shane,

    That worked beautifully. I was doing it in a roundabout way with scripts, this is much cleaner. Thanks and we really love your product!



Please sign in to leave a comment.

Didn't find what you were looking for?

New post