Thank you for following up.
I'll try to clarify.
ADTv3
In ADT 3 we define a variable in the Variables section of Deploy-Application.ps1:
[String[]]$appProcesses = @('notepad')
and then we have this code in the initialization section of Deploy-Application.ps1:
if (($DeployMode -ine 'Interactive') -and ($appProcesses)) {
if ($null -ne (Get-Process -Name $appProcesses -ErrorAction SilentlyContinue)) {
Write-Log -Message 'Conflicting applications were running, non interactive mode. Exiting.' -Severity 2 -Source $deployAppScriptFriendlyName
Exit-Script -ExitCode 60012
}
}
This app is then uploaded to SCCM and deployed as:
- required
- as system
- whether or not users are logged on
When this app is executed on the device when a user is logged on and the running process is detected as being open the following happens as shown in the log file:
<![LOG[[Initialization] :: *******************************************************************************]LOG]!><time="11:33:31.469-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: *******************************************************************************]LOG]!><time="11:33:31.469-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: [Test_Notepad_EN_01] setup started.]LOG]!><time="11:33:31.490-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Script [C:\Windows\ccmcache\j\AppDeployToolkit\AppDeployToolkitMain.ps1] dot-source invoked by [C:\Windows\ccmcache\j\Deploy-Application.ps1]]LOG]!><time="11:33:31.627-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Script [C:\Windows\ccmcache\j\AppDeployToolkit\AppDeployToolkitExtensions.ps1] dot-source invoked by [C:\Windows\ccmcache\j\AppDeployToolkit\AppDeployToolkitMain.ps1]]LOG]!><time="11:33:31.932-360" date="09-25-2025" component="PSAppDeployToolkitExt" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="AppDeployToolkitMain.ps1">
<![LOG[[Initialization] :: [Test_Notepad_EN_01] script version is [1.0.0]]LOG]!><time="11:33:32.183-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: [Test_Notepad_EN_01] script date is [XX/XX/20XX]]LOG]!><time="11:33:32.187-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: [Test_Notepad_EN_01] script author is [<author name>]]LOG]!><time="11:33:32.193-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: [Deploy Application] script version is [3.10.2]]LOG]!><time="11:33:32.197-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: The following non-default parameters were passed to [Deploy Application]: [-DeploymentType:'install']]LOG]!><time="11:33:32.201-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: [App Deploy Toolkit Main] script version is [3.10.2]]LOG]!><time="11:33:32.205-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: [App Deploy Toolkit Extensions] version is [3.10.1]]LOG]!><time="11:33:32.209-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Computer Name is [VM-N1.DOMAIN.ca]]LOG]!><time="11:33:32.213-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Current User is [NT AUTHORITY\SYSTEM]]LOG]!><time="11:33:32.217-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: OS Version is [Microsoft Windows 11 Education 64-bit 10.0.26100.6584]]LOG]!><time="11:33:32.220-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: OS Type is [Workstation]]LOG]!><time="11:33:32.227-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Current Culture is [en-US], language is [EN] and UI language is [EN]]LOG]!><time="11:33:32.234-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Hardware Platform is [Virtual:Hyper-V]]LOG]!><time="11:33:32.267-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: PowerShell Host is [ConsoleHost] with version [5.1.26100.6584]]LOG]!><time="11:33:32.274-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: PowerShell Version is [5.1.26100.6584 x64]]LOG]!><time="11:33:32.279-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: PowerShell CLR (.NET) version is [4.0.30319.42000]]LOG]!><time="11:33:32.282-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: *******************************************************************************]LOG]!><time="11:33:32.289-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Display session information for all logged on users:
NTAccount : DOMAIN\UserX
SID : S-1-5-21-1060284298-436374069-1708537768-133359
UserName : alt421
DomainName : DOMAIN
SessionId : 2
SessionName : 31C5CE94259D4006A9E4#0
ConnectState : Active
IsCurrentSession : False
IsConsoleSession : False
IsActiveUserSession : True
IsUserSession : True
IsRdpSession : True
IsLocalAdmin : False
LogonTime : 9/25/2025 11:31:21 AM
IdleTime : -00:06:35.3019081
DisconnectTime :
ClientName : WS1
ClientProtocolType : RDP
ClientDirectory : C:\WINDOWS\system32\mstscax.dll
ClientBuildNumber : 26100
]LOG]!><time="11:33:32.300-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: The following users are logged on to the system: [DOMAIN\UserX].]LOG]!><time="11:33:32.304-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Current process is running under a system account [NT AUTHORITY\SYSTEM].]LOG]!><time="11:33:32.309-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: There is no console user logged in (user with control of physical monitor, keyboard, and mouse).]LOG]!><time="11:33:33.172-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: The active logged on user is [DOMAIN\UserX].]LOG]!><time="11:33:34.647-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: The active logged on user [DOMAIN\UserX] has a primary UI language of [EN].]LOG]!><time="11:33:34.743-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: The following UI messages were imported from the config XML file: [UI_Messages_EN].]LOG]!><time="11:33:34.790-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: The active logged on user [DOMAIN\UserX] has a DPI scale factor of [100] with DPI pixels [96].]LOG]!><time="11:33:35.431-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence.]LOG]!><time="11:33:35.474-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Service [Schedule] exists.]LOG]!><time="11:33:35.896-360" date="09-25-2025" component="Test-ServiceExists" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Getting the service [Schedule] startup mode.]LOG]!><time="11:33:35.966-360" date="09-25-2025" component="Get-ServiceStartMode" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Service [Schedule] startup mode is set to [Automatic].]LOG]!><time="11:33:36.045-360" date="09-25-2025" component="Get-ServiceStartMode" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Getting the service object for service [Schedule].]LOG]!><time="11:33:36.225-360" date="09-25-2025" component="Start-ServiceAndDependencies" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Service [Schedule] with display name [Task Scheduler] has a status of [Running].]LOG]!><time="11:33:36.262-360" date="09-25-2025" component="Start-ServiceAndDependencies" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: The task scheduler service is in a healthy state: True.]LOG]!><time="11:33:36.412-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Session 0 detected, process not running in user interactive mode; deployment mode set to [NonInteractive].]LOG]!><time="11:33:36.455-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Installation is running in [NonInteractive] mode.]LOG]!><time="11:33:36.461-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Deployment type is [Installation].]LOG]!><time="11:33:36.467-360" date="09-25-2025" component="PSAppDeployToolkit" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Conflicting applications were running, non interactive mode. Exiting.]LOG]!><time="11:33:36.488-360" date="09-25-2025" component="Deploy Application" context="NT AUTHORITY\SYSTEM" type="2" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Cleanup] :: Bypassing Close-InstallationProgress [Mode: NonInteractive]]LOG]!><time="11:33:36.517-360" date="09-25-2025" component="Close-InstallationProgress" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Cleanup] :: Test_Notepad_EN_01 Installation completed with exit code [60012].]LOG]!><time="11:33:36.526-360" date="09-25-2025" component="Exit-Script" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
<![LOG[[Cleanup] :: -------------------------------------------------------------------------------]LOG]!><time="11:33:36.533-360" date="09-25-2025" component="Exit-Script" context="NT AUTHORITY\SYSTEM" type="1" thread="3272" file="Deploy-Application.ps1">
Even though user is logged on, session is run as "NonIneractive" and the custom code section forces the toolkit to exit as running processes are detected.
ADTv4.1
Now if I attempt the same in ADT 4.1.5, we see the following behavior:
I set the process to check for at the top of Invoke-AppDeployToolkit.ps1:
AppProcessesToClose = @('notepad')
Then in the pre-installation section I have the following code section:
if (($($adtSession.DeployMode) -ine 'Interactive') -and ($adtSession.AppProcessesToClose)) {
if (Get-ADTRunningProcesses -ProcessObjects $adtSession.AppProcessesToClose) {
Write-ADTLogEntry -Message "Conflicting applications were running, non interactive mode. Exiting." -Severity 2
Close-ADTSession -ExitCode 1602
}
}
This app is then uploaded to SCCM and deployed as:
- required
- as system
- whether or not users are logged on
When this app is executed on the device when a user is logged on and the running process is detected as being open the following happens as shown in the log file:
<![LOG[-------------------------------------------------------------------------------]LOG]!><time="11:33:50.280-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [Notepad_Notepad_1_EN_01] install started.]LOG]!><time="11:33:50.332-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [Notepad_Notepad_1_EN_01] script version is [1.0.0].]LOG]!><time="11:33:50.334-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [Notepad_Notepad_1_EN_01] script date is [2025-09-07].]LOG]!><time="11:33:50.336-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [Invoke-AppDeployToolkit.ps1] script version is [4.1.5].]LOG]!><time="11:33:50.338-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: The following parameters were passed to [Invoke-AppDeployToolkit.ps1]: [-DeploymentType:'install'].]LOG]!><time="11:33:50.341-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] module version is [4.1.5].]LOG]!><time="11:33:50.343-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] module imported in [4.9930324] seconds.]LOG]!><time="11:33:50.344-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] module initialized in [3.0968536] seconds.]LOG]!><time="11:33:50.345-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] module path is ['C:\Windows\ccmcache\k\PSAppDeployToolkit'].]LOG]!><time="11:33:50.346-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] config path is ['C:\Windows\ccmcache\k\Config'].]LOG]!><time="11:33:50.348-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] string path is ['C:\Windows\ccmcache\k\Strings'].]LOG]!><time="11:33:50.349-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] session mode is [Native].]LOG]!><time="11:33:50.351-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Computer Name is [VM-N1.DOMAIN.ca].]LOG]!><time="11:33:50.354-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Current User is [NT AUTHORITY\SYSTEM].]LOG]!><time="11:33:50.355-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: OS Version is [Microsoft Windows 11 Education X64 10.0.26100.6584].]LOG]!><time="11:33:50.356-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: OS Type is [WorkStation].]LOG]!><time="11:33:50.358-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Hardware Platform is [Virtual:Hyper-V].]LOG]!><time="11:33:50.359-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Current Culture is [en-US], language is [EN] and UI language is [EN].]LOG]!><time="11:33:50.360-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: PowerShell Host is [ConsoleHost] with version [5.1.26100.6584].]LOG]!><time="11:33:50.361-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: PowerShell Version is [5.1.26100.6584 X64].]LOG]!><time="11:33:50.363-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: PowerShell Process Path is [C:\Windows\system32\WindowsPowerShell\v1.0\PowerShell.exe].]LOG]!><time="11:33:50.364-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: PowerShell CLR (.NET) version is [4.0.30319.42000].]LOG]!><time="11:33:50.365-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: The following users are logged on to the system: [DOMAIN\UserX].]LOG]!><time="11:33:50.367-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Session information for all logged on users:
NTAccount : DOMAIN\UserX
SID : S-1-5-21-1060284298-436374069-1708537768-133359
UserName : alt421
DomainName : DOMAIN
SessionId : 2
SessionName : 31C5CE94259D4006A9E4#0
ConnectState : WTSActive
IsCurrentSession : False
IsConsoleSession : False
IsActiveUserSession : True
IsValidUserSession : True
IsUserSession : True
IsRdpSession : True
IsLocalAdmin : False
IsLocalAdminException :
LogonTime : 9/25/2025 11:31:21 AM
IdleTime : 00:00:51.5088314
DisconnectTime :
ClientName : WS1
ClientProtocolType : RDP
ClientDirectory : C:\WINDOWS\system32\mstscax.dll
ClientBuildNumber : 26100
]LOG]!><time="11:33:50.369-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Current process is running under a system account [NT AUTHORITY\SYSTEM].]LOG]!><time="11:33:50.372-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: There is no console user logged on (user with control of physical monitor, keyboard, and mouse).]LOG]!><time="11:33:50.376-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: The active logged on user who will receive UI elements is [DOMAIN\UserX].]LOG]!><time="11:33:50.377-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: The current execution context has a primary UI language of [en-US].]LOG]!><time="11:33:50.378-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: The following locale was used to import UI messages from the strings.psd1 files: [en-US].]LOG]!><time="11:33:50.380-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Unable to find COM object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence.]LOG]!><time="11:33:50.381-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Device has completed the OOBE and toolkit is not running with an active ESP in progress.]LOG]!><time="11:33:50.386-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Session 0 detected, user(s) logged on to interact if required.]LOG]!><time="11:33:50.388-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: The processes ['Notepad'] were found to be running and will require closure.]LOG]!><time="11:33:50.405-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Installation is running in [Interactive] mode.]LOG]!><time="11:33:50.432-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Deployment type is [Install].]LOG]!><time="11:33:50.435-360" date="9-25-2025" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Module [PSAppDeployToolkit.Extensions] imported successfully.]LOG]!><time="11:33:50.670-360" date="9-25-2025" component="PSAppDeployToolkit.Extensions.psm1" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit.Extensions\PSAppDeployToolkit.Extensions.psm1">
<![LOG[[Pre-Install] :: Getting information for installed applications...]LOG]!><time="11:33:50.763-360" date="9-25-2025" component="Get-ADTApplication" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Pre-Install] :: Found no application based on the supplied FilterScript.]LOG]!><time="11:33:50.843-360" date="9-25-2025" component="Get-ADTApplication" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Pre-Install] :: Evaluating disk space requirements.]LOG]!><time="11:33:51.014-360" date="9-25-2025" component="Show-ADTInstallationWelcome" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Pre-Install] :: Retrieving free disk space for drive [C:\].]LOG]!><time="11:33:51.027-360" date="9-25-2025" component="Get-ADTFreeDiskSpace" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Pre-Install] :: Free disk space for drive [C:\]: [73634 MB].]LOG]!><time="11:33:51.033-360" date="9-25-2025" component="Get-ADTFreeDiskSpace" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Pre-Install] :: Successfully passed minimum disk space requirement check.]LOG]!><time="11:33:51.040-360" date="9-25-2025" component="Show-ADTInstallationWelcome" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Pre-Install] :: Checking for running processes: ['notepad']]LOG]!><time="11:33:51.086-360" date="9-25-2025" component="Get-ADTRunningProcesses" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Pre-Install] :: The following processes are running: ['Notepad'].]LOG]!><time="11:33:51.104-360" date="9-25-2025" component="Get-ADTRunningProcesses" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Pre-Install] :: Instantiating user client/server process.]LOG]!><time="11:33:51.202-360" date="9-25-2025" component="Invoke-ADTClientServerOperation" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Pre-Install] :: Prompting the user to close application(s) ['Notepad.exe']...]LOG]!><time="11:33:52.186-360" date="9-25-2025" component="Show-ADTInstallationWelcome" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="D:\a\PSAppDeployToolkit\PSAppDeployToolkit\src\PSADT\PSADT.ClientServer.Server\ServerInstance.cs">
<![LOG[[Pre-Install] :: Deployment deferred by the user.]LOG]!><time="11:34:29.812-360" date="9-25-2025" component="Show-ADTInstallationWelcome" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Finalization] :: Closing user client/server process.]LOG]!><time="11:34:29.842-360" date="9-25-2025" component="Close-ADTClientServerProcess" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Finalization] :: [Notepad_Notepad_1_EN_01] install completed in [39.9763652] seconds with exit code [1602].]LOG]!><time="11:34:30.251-360" date="9-25-2025" component="Close-ADTSession" context="NT AUTHORITY\SYSTEM" type="2" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[-------------------------------------------------------------------------------]LOG]!><time="11:34:30.254-360" date="9-25-2025" component="Close-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="5812" file="C:\Windows\ccmcache\k\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
Code section that checks if deployment is not interactive is bypassed and user is presented with an interactive prompt to close the running process.
On standard workstations where there is a primary user, this new behavior may not be an issue as letting users interact with the close process dialog would still accomplish the goal of updating the app, but there are some other use cases in our environment such as presentation computers, public use devices and display screens where we absolutely don't want to present any UI prompts to the active user and rely on the system retrying the installation to opportunistically perform the installation when either no users are logged on or the process is no longer open.
My guess is that our approach as to how we've been deploying our apps will need to change. Maybe tagging the devices somehow where we don't want to present any interactive UI elements and based on that tag, suppressing all of the dialogs even in an Interactive deployment.
Feel free to ping me directly if you need me to provide any additional documentation, etc.
Thank you.