Closing an app running within the user context during deployment

We have Greenshot deployed to our domain computers, and I’m trying to roll out an updated version.

I’m using the toolkit to build packages and deploying them via WSUS & WPP (WSUS Package Publisher).

IF the test user is logged in Greenshot is running. When it’s running the it can’t be updated. I’ve tried various permutations of CloseApps, Execute-Process, Execute-ProcessAsUser, as well as some stuff native to the WPP tool and nothing seems to work.

Can anyone point me in a positive direction?

Thanks in advance,

Bill

In the Deploy-Application.ps1 file, there is an example line for how to prompt the user:
Show-InstallationWelcome -CloseApps 'iexplore' -AllowDefer -DeferTimes 3 -CheckDiskSpace -PersistPrompt

In that example, internet explorer is the program that is required to be closed, and will prompt the user to close.
If you are using this line but with the process name for Greenshot rather than iexplore, post your code and log files and we’ll see if we can help troubleshoot.

I’ve used -CloseApps successfully in the past in other packages, but it doesn’t work in this instance. I looked through the help file for the command usage but can’t see any way to force close apps, which I think is the issue here.

Also tried the following, which should work but does not

<Perform Pre-Installation tasks here>

    Execute-ProcessAsUser -Path "C:\Program Files\Greenshot\Greenshot.exe" -Parameters "/EXIT"

Eventually I used the following in WPP

<PathToExecutable>c:\Windows\System32\taskkill.exe</PathToExecutable>
<Parameters>/F /IM greenshot.exe /T</Parameters>