V4.1.6 & v4.1.7 - CloseProcesses not working

Hey Guys, i'm trying to figure out whats wrong here.

I actually tested the versions mentioned above.

If i try to uninstall an application with my PSADT-Script Locally Stored on the target computer using psexec to simulate being the system user (because we're deploying apps thorugh intune using system user because our users are not allowed to install anything on their computers without admin rights). Everything works just fine, but the Processes which needs to be closed wont show up. Its like an endless loop, as you can see here:

Image removed because personal details were visible<

Even if the countdown ends, the Close Apps & Uninstall never shows up:

PS C:\_install\21.8.0> .\Invoke-AppDeployToolkit.ps1 unInstall
[2025-12-16T13:01:41.5300546+01:00] [Initialization] [Open-ADTSession] [Info] :: -------------------------------------------------------------------------------
[2025-12-16T13:01:41.5320490+01:00] [Initialization] [Open-ADTSession] [Info] :: [Bluebeam_Revu_21.8.0_x64_DE_01] uninstall started.
[2025-12-16T13:01:41.5340484+01:00] [Initialization] [Open-ADTSession] [Info] :: [Bluebeam_Revu_21.8.0_x64_DE_01] script version is [2.2.2].
[2025-12-16T13:01:41.5350504+01:00] [Initialization] [Open-ADTSession] [Info] :: [Bluebeam_Revu_21.8.0_x64_DE_01] script date is [2025-12-15].
[2025-12-16T13:01:41.5370583+01:00] [Initialization] [Open-ADTSession] [Info] :: [Bluebeam_Revu_21.8.0_x64_DE_01] script author is [Marco Nohr].
[2025-12-16T13:01:41.5381444+01:00] [Initialization] [Open-ADTSession] [Info] :: [Invoke-AppDeployToolkit.ps1] script version is [4.1.6].
[2025-12-16T13:01:41.5395881+01:00] [Initialization] [Open-ADTSession] [Info] :: The following parameters were passed to [Invoke-AppDeployToolkit.ps1]: [-DeploymentType:'unInstall'].
[2025-12-16T13:01:41.5416962+01:00] [Initialization] [Open-ADTSession] [Info] :: [PSAppDeployToolkit] module version is [4.1.6].
[2025-12-16T13:01:41.5426967+01:00] [Initialization] [Open-ADTSession] [Info] :: [PSAppDeployToolkit] module imported in [1,3198622] seconds.
[2025-12-16T13:01:41.5436977+01:00] [Initialization] [Open-ADTSession] [Info] :: [PSAppDeployToolkit] module initialized in [0,8429903] seconds.
[2025-12-16T13:01:41.5446973+01:00] [Initialization] [Open-ADTSession] [Info] :: [PSAppDeployToolkit] module path is ['C:\_install\21.8.0\PSAppDeployToolkit'].
[2025-12-16T13:01:41.5467044+01:00] [Initialization] [Open-ADTSession] [Info] :: [PSAppDeployToolkit] config path is ['C:\_install\21.8.0\Config'].
[2025-12-16T13:01:41.5476979+01:00] [Initialization] [Open-ADTSession] [Info] :: [PSAppDeployToolkit] string path is ['C:\_install\21.8.0\Strings'].
[2025-12-16T13:01:41.5487028+01:00] [Initialization] [Open-ADTSession] [Info] :: [PSAppDeployToolkit] session mode is [Native].
[2025-12-16T13:01:41.5497183+01:00] [Initialization] [Open-ADTSession] [Info] :: Computer Name is [NB-*******.**********].
[2025-12-16T13:01:41.5507225+01:00] [Initialization] [Open-ADTSession] [Info] :: Current User is [NT-AUTORITÄT\SYSTEM].
[2025-12-16T13:01:41.5522419+01:00] [Initialization] [Open-ADTSession] [Info] :: OS Version is [Microsoft Windows 11 Enterprise X64 10.0.26200.7462].
[2025-12-16T13:01:41.5527490+01:00] [Initialization] [Open-ADTSession] [Info] :: OS Type is [WorkStation].
[2025-12-16T13:01:41.5550125+01:00] [Initialization] [Open-ADTSession] [Info] :: Hardware Platform is [Physical].
[2025-12-16T13:01:41.5570106+01:00] [Initialization] [Open-ADTSession] [Info] :: Current Culture is [de-DE], language is [DE] and UI language is [DE].
[2025-12-16T13:01:41.5593193+01:00] [Initialization] [Open-ADTSession] [Info] :: PowerShell Host is [ConsoleHost] with version [5.1.26100.7462].
[2025-12-16T13:01:41.5614936+01:00] [Initialization] [Open-ADTSession] [Info] :: PowerShell Version is [5.1.26100.7462 X64].
[2025-12-16T13:01:41.5698619+01:00] [Initialization] [Open-ADTSession] [Info] :: PowerShell Process Path is [C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe].
[2025-12-16T13:01:41.5728750+01:00] [Initialization] [Open-ADTSession] [Info] :: PowerShell CLR (.NET) version is [4.0.30319.42000].
[2025-12-16T13:01:41.5748853+01:00] [Initialization] [Open-ADTSession] [Info] :: The following users are logged on to the system: [*******\****].
[2025-12-16T13:01:41.5788975+01:00] [Initialization] [Open-ADTSession] [Info] :: Current process is running with user account [NT-AUTORITÄT\SYSTEM] under logged on user session for [*****\*****].
[2025-12-16T13:01:41.5809089+01:00] [Initialization] [Open-ADTSession] [Info] :: There is no console user logged on (user with control of physical monitor, keyboard, and mouse).
[2025-12-16T13:01:41.5831678+01:00] [Initialization] [Open-ADTSession] [Info] :: The active logged on user who will receive UI elements is [*****\******].
[2025-12-16T13:01:41.5841739+01:00] [Initialization] [Open-ADTSession] [Info] :: The current execution context has a primary UI language of [de-DE].
[2025-12-16T13:01:41.5866219+01:00] [Initialization] [Open-ADTSession] [Info] :: The config file was configured to override the detected primary UI language with the following UI language: [de].
[2025-12-16T13:01:41.5886263+01:00] [Initialization] [Open-ADTSession] [Info] :: The following locale was used to import UI messages from the strings.psd1 files: [de].
[2025-12-16T13:01:41.5906237+01:00] [Initialization] [Open-ADTSession] [Info] :: Unable to find COM object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence.
[2025-12-16T13:01:41.5986259+01:00] [Initialization] [Open-ADTSession] [Info] :: Device has completed the OOBE and toolkit is not running with an active ESP in progress.
[2025-12-16T13:01:41.6006403+01:00] [Initialization] [Open-ADTSession] [Info] :: Session 0 detected, user(s) logged on to interact if required.
[2025-12-16T13:01:41.6076426+01:00] [Initialization] [Open-ADTSession] [Info] :: The processes ['BBPrint'] were found to be running and will require closure.
[2025-12-16T13:01:41.6106515+01:00] [Initialization] [Open-ADTSession] [Info] :: Installation is running in [Interactive] mode.
[2025-12-16T13:01:41.6126636+01:00] [Initialization] [Open-ADTSession] [Info] :: Deployment type is [Uninstall].
[2025-12-16T13:01:41.6601664+01:00] [Pre-Uninstall] [Get-ADTRunningProcesses] [Info] :: Checking for running processes: ['BBPrint']
[2025-12-16T13:01:41.6734643+01:00] [Pre-Uninstall] [Get-ADTRunningProcesses] [Info] :: The following processes are running: ['BBPrint'].
[2025-12-16T13:01:41.6829773+01:00] [Pre-Uninstall] [Invoke-ADTClientServerOperation] [Info] :: Instantiating user client/server process.
[2025-12-16T13:01:42.0125890+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: Countdown has [00:01:00] seconds remaining.
[2025-12-16T13:02:12.0162471+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:13.0382785+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:14.0587902+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:15.0847385+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:16.1035781+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:17.1076847+01:00] [Pre-Uninstall] [Get-ADTRunningProcesses] [Info] :: Checking for running processes: ['BBPrint']
[2025-12-16T13:02:17.1146982+01:00] [Pre-Uninstall] [Get-ADTRunningProcesses] [Info] :: The following processes are running: ['BBPrint'].
[2025-12-16T13:02:17.1446272+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: Countdown has [00:00:25.3613947] seconds remaining.
[2025-12-16T13:02:43.5068639+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: Countdown timer has elapsed and no processes running. Force continue.
[2025-12-16T13:02:43.5393116+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:44.5689403+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:45.5971943+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:46.6358120+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:47.6657731+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:48.6790833+01:00] [Pre-Uninstall] [Get-ADTRunningProcesses] [Info] :: Checking for running processes: ['BBPrint']
[2025-12-16T13:02:48.6912715+01:00] [Pre-Uninstall] [Get-ADTRunningProcesses] [Info] :: The following processes are running: ['BBPrint'].
[2025-12-16T13:02:48.7076810+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: Countdown has [00:00:00] seconds remaining.
[2025-12-16T13:02:48.8552977+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: Countdown timer has elapsed and no processes running. Force continue.
[2025-12-16T13:02:48.8873846+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:49.9141394+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:50.9309103+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:51.9497148+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:52.9738413+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:53.9924944+01:00] [Pre-Uninstall] [Get-ADTRunningProcesses] [Info] :: Checking for running processes: ['BBPrint']
[2025-12-16T13:02:54.0065019+01:00] [Pre-Uninstall] [Get-ADTRunningProcesses] [Info] :: The following processes are running: ['BBPrint'].
[2025-12-16T13:02:54.0235223+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: Countdown has [00:00:00] seconds remaining.
[2025-12-16T13:02:54.1023470+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: Countdown timer has elapsed and no processes running. Force continue.
[2025-12-16T13:02:54.1495048+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:55.1818598+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:56.2260993+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:57.2420723+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:58.2626080+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:02:59.2761035+01:00] [Pre-Uninstall] [Get-ADTRunningProcesses] [Info] :: Checking for running processes: ['BBPrint']
[2025-12-16T13:02:59.2881615+01:00] [Pre-Uninstall] [Get-ADTRunningProcesses] [Info] :: The following processes are running: ['BBPrint'].
[2025-12-16T13:02:59.3130045+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: Countdown has [00:00:00] seconds remaining.
[2025-12-16T13:02:59.5075114+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: Countdown timer has elapsed and no processes running. Force continue.
[2025-12-16T13:02:59.5433068+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:03:00.5756706+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:03:01.5960987+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:03:02.6196790+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:03:03.6381318+01:00] [Pre-Uninstall] [Show-ADTInstallationWelcome] [Info] :: The application(s) ['BBPrint Application'] are still running, checking again in 1 second...
[2025-12-16T13:03:04.6439876+01:00] [Pre-Uninstall] [Get-ADTRunningProcesses] [Info] :: Checking for running processes: ['BBPrint']
[2025-12-16T13:03:04.6507276+01:00] [Pre-Uninstall] [Close-ADTClientServerProcess] [Info] :: Closing user client/server process.

i tried everything, followed the Teamplate but it still doesnt work.

Can anyone tell me whats going on?

Show-ADTInstallationWelcome -CloseProcesses @{ Name = 'BBPrint'; Description = 'BBPrint Application' } -CloseProcessesCountdown 60 -PersistPrompt -ErrorAction Stop

I also tried to configure the exact same in the $adt.Session Object in App AppProcessesToClose, but then, the installation just starts without prompting me a window to close the running process(es).

I'm going to assume it's a service or some other application the user can't close? The user can only close apps that they themselves can close. If this is a service, stop it via Stop-ADTServiceAndDependencies

I actually have an app to deploy, which starts the Process "BBPrint.exe" as "SYSTEM" after the Installation. If i try to uninstall that App, it stucks on exactly that Process. How can we fix this? When i was using the older Version of PSADT < v4.1.0 and > v.4.0.x i wasnt having that Problem on Processes like that.

Any suggestions?

Have you tried to stop the Process "BBPrint.exe" with an Admin account?
Does it actually stop?
Maybe there's a watchdog service that restarts it.

Theres actually no watchdog service which restarts that process nor is it a service.

It can be closed with an admin account through the task manager, which is no option for my case.

And doing something like:

    $ProcessToKill = 'BBPrint'
    if (Get-process -Name $ProcessToKill -ErrorAction SilentlyContinue) {
        $Answer = Show-ADTInstallationPrompt -Title "Warning" -Message "Found `"$ProcessToKill`", kill it?" -ButtonRightText "Yes" -ButtonMiddleText "No" -ButtonLeftText "Cancel"
        Switch ($Answer) {
            "Yes" {
                try {
                    Stop-Process -Name $ProcessToKill -ErrorAction Stop -Force
                }
                Catch {
                    Show-ADTDialogBox -Title "Failed to stop $ProcessToKill !" -Text "Installation cannot continue!" -Icon Stop -Buttons Ok -Timeout 30
                    Close-ADTSession -ExitCode 1618
                }
            }
            "No" {
                Show-ADTDialogBox -Title "Information" -Text "Installation cannot continue!" -Icon Stop -Buttons Ok -Timeout 30
                Close-ADTSession -ExitCode 1618
            }
            "Cancel" {
                Close-ADTSession -ExitCode 1602
            }
        }
    }

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.