Modification needed in "Show-InstallationWelcome"

Hello guys,

I had been using the Show-InstallationWelcome function with great success, however the existing script is not good enough in following scenario:

I need to kill only 1 particular instance of process that is run from 1 particular location, leaving the other processes with the same name but that are being run from other locations intact. No defer enabled.

Show-InstallationWelcome -CloseApps “deploytoolkit” -PersistPrompt -CloseAppsCountdown 600

Here is an example:

2 processess named deploytoolkit.exe are running and Windows Task Manager shows “Image Path Name”:
C:\Program Files (x86)\APP\deploytoolkit.exe
C:\Program Files\Common Files\APP\deploytoolkit.exe

I need to end only deploytoolkit.exe that is launched from path “C:\Program Files\Common Files\APP\deploytoolkit.exe” while leaving the other one intact.

Is there any way to modify the Show-InstallationWelcome function to achieve this? I have tried several things, but could not get it to work properly. Any help is much appreciated!

Nevermind, I figured it out, please close/delete the thread :slight_smile:


Could you share your answer?

Thank You

Hello, we have the same requirement here… Does someone have an idea how to implement this ? Should it be possible to give a new argument like the path of the process?

Something like
processes = Get-process | where {_.Path -like ‘C:\Program Files (x86)\IBM*’}
Foreach ($process in $processes) {

Show-InstallationWelcome -CloseApps “$”

I would like to know if there is a good method too. Right now i am ending up with this workaround.

$Process = Get-CimInstance -ClassName Win32_Process -Filter “CommandLine LIKE ‘%yourpath%’”

Stop-Process -Id $Process.ProcessId -PassThru