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.

Upgrading an Application in Use

How does one monitor for specified running processes so that PDQ Deploy knows when it can successfully install the new version of an application?

Another option might be to use Powershell App Deployment Toolkit where it prompts the user to close the application before installing. This works well with SCCM, but I can't find a way for PDQ Deploy to present the GUI to the logged on user.

Thanks.

0

Comments

5 comments
Date Votes
  • I have this very simple powershell script that will fail the deployment if the specified process is running. Just put it in a powershell step at the beginning of your deployment:

    $Process = Get-Process notepad -ErrorAction SilentlyContinue
    
    if ($Process -ne $null) #if process exists
    {
        Write-Output "process running. Exiting"
        exit 1 #exit with error code 1
    }
    

    If you use the Powershell App Deployment Toolkit or anything else that needs to be interactive to the user, make sure that step runs as logged on user. (Options tab -> Run As)

    0
  • Running as a logged on user would be helpful, but it requires the user to have admin rights. With SCCM, the user can be a standard user.

    0
  • Ah, right. Try running as Deploy user (interactive). That won't require your users to have admin rights, and will still run in an interactive shell and show messages to the logged on user.

    0
  • Oh thank you, I missed that detail.

    0
  • The Powershell example above is definitely cleaner but here's a command prompt step that I use, just change the .exe both times. This example is what I would use for checking if Internet Explorer is running.

    tasklist /FI "IMAGENAME eq iexplore.exe" 2>NUL | find /I /N "iexplore.exe">NUL
    if "%ERRORLEVEL%"=="0" exit /b 1
    

    It could probably be simplified and cleaner but it works. A pro tip would be to put these "condition checker" steps into their own packages, and then in the future you can just put them in any package you want with a Nested Package step.

    0