Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

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.

Thanks

Len

0

Comments

2 comments
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

    0
  • 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!

    Len

    0