Error while checking running applications (3.6.0)

Topics: Archive - General
Mar 23, 2015 at 3:30 PM
Edited Mar 23, 2015 at 3:41 PM

I'm not totally sure but I think I might have stumbled upon a bug in 3.6.0.

Trying to update to the latest flash plugin, and using the CloseApps parameter to prompt user to close IE, Chrome and/or Firefox. It runs just fine on some machines, but has given an error on others.

Here's what the log says on the failing machines:
[Pre-Installation] :: Check for running application(s) [iexplore,chrome,firefox]... Get-RunningProcesses    23.03.2015 14:01:34 28720 (0x7030)
[Pre-Installation] :: The following processes are running: [iexplore]   Get-RunningProcesses    23.03.2015 14:01:34 28720 (0x7030)
[Pre-Installation] :: Resolve process descriptions...   Get-RunningProcesses    23.03.2015 14:01:34 28720 (0x7030)
[Pre-Installation] :: Finished checking running application(s). Get-RunningProcesses    23.03.2015 14:01:34 28720 (0x7030)
[Pre-Installation] :: Error Record:

Message        : Cannot process argument because the value of argument "obj" is
                  null. Change the value of argument "obj" to a non-null value.
InnerException : 

FullyQualifiedErrorId : ArgumentNull,Microsoft.PowerShell.Commands.SelectObject
ScriptStackTrace      : at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
                        he\2s\AppDeployToolkit\AppDeployToolkitMain.ps1: line 4
                        at <ScriptBlock>, C:\WINDOWS\ccmcache\2s\Deploy-Applica
                        tion.ps1: line 102
                        at <ScriptBlock>, <No file>: line 1
                        at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\2s\AppDeployToolkit\AppDeployToolkitMa
                  in.ps1:4912 char:64
                  +                 [string]$runningProcessDescriptions = ($run
                  ningProcesses | Select-Object -Ex ...

    Deploy Application  23.03.2015 14:01:34 28720 (0x7030)
I am using the application model in SCCM (2012 R2 CU4) and have a Install.bat firing off the following command running as system:
  • %cd%\ServiceUIx64.exe %cd%\Deploy-Application.exe
I've also ticked the box "Run installation [...] as 32-bit process [...]" as it has worked great with all my previous 3.5.0-deployments.

User experience is set as a follows:
  • Installation behaviour: Install for system
  • Logon requirement: Whether or not user is logged on
  • Installation program visibility: Normal
I've tried out different scenarios with user being logged on and with combinations of the three processes running. All results in same error.

If I change the script to only look for iexplore and not the other two it runs without errors.

Below is my Show-InstallationWelcome command:
Show-InstallationWelcome -CloseApps 'iexplore,chrome,firefox' -AllowDefer -DeferTimes 3 -CheckDiskSpace -PersistPrompt
Heres a technet discussion on the error code but I'm unsure of how to implement this in the code (if possible even).

Any suggestions :)?

Thanks in advance!

EDIT: Uploaded entire log to my onedrive:
Mar 23, 2015 at 4:24 PM
Edited Mar 23, 2015 at 4:27 PM
Ok, so I've discovered that the error only occurs when any of the processes is in a hung state (i.e. the process is running but GUI is not showing) as the script executes. Unfortunately this seems to be fairly common in my environment as my package only has been tested out on a few machines and the error has happened at numerous occations already.

I should mention that both Firefox and Chrome are App-V 5.0 based deployments.

Nevertheless, it seems to me that the script is having issues detecting / ending processes in an erroring state.
Mar 23, 2015 at 5:40 PM
The failure is occurring when we try to use Select-Object to expand the value of the Description field for the process. My guess is that when a process gets into a hung state, windows is not able to access the Description field of the process anymore and when we try to access it and expand the value, we end up with an error.

I've added a check to make sure the Description filed of a process is not $null before we try to expand that value by adding the following bit of code: Where-Object { $null -ne $_.Description }

You can find the latest 3.6.1 beta under the "Source Code" tab of this site for testing purposes. We will probably have a final release out some time this week.
Mar 24, 2015 at 9:30 AM
Thank you for the quick response! I'll try it out throughout the day and come back with the results as soon as I have them!
Mar 24, 2015 at 2:27 PM
Edited Mar 25, 2015 at 12:48 PM
I've deployed the package to a couple of machines now, and have not experienced any issues after the fix.

Thank you heaps!!

In case anyone reading this wondering what file to download:
It's the AppDeployToolkitMain.ps1 under the following path Sources\Toolkit\AppDeployToolkit\AppDeployToolkitMain.ps1, but I'm sure the content on that page could change at any time so be aware of the date this was posted.
Apr 3, 2015 at 10:19 AM
Edited Apr 3, 2015 at 10:28 AM

I need to detect a running application which has no description.
With 3.6.0 under Windows 8 (not 8.1) the script faild with the same error like plepleple already wrote.
With 3.6.1 (Windwos 8 and Windows 8.1) the script detects the running process but continues the installation because there is no description in the process:

[04-03-2015 11:10:11.057] [Pre-Installation] [Get-RunningProcesses] :: Check for running application(s) [svrpgsoo]...
[04-03-2015 11:10:11.084] [Pre-Installation] [Get-RunningProcesses] :: The following processes are running: [svrpgsoo]
[04-03-2015 11:10:11.108] [Pre-Installation] [Get-RunningProcesses] :: Resolve process descriptions...
[04-03-2015 11:10:11.136] [Pre-Installation] [Get-RunningProcesses] :: Finished checking running application(s).
[04-03-2015 11:10:11.179] [Pre-Installation] [Show-BalloonTip] :: Display balloon tip notification with message [Install
ation gestartet.]

The manually added Descripton should be displayed instead, so my users know which Program to close:
Show-InstallationWelcome -CloseApps 'svrpgsoo=Infor WinClient' -CloseAppsCountdown 300

Can you please fix this bug. Thanks for your help!
Apr 3, 2015 at 11:37 AM
I updated the logic around process descriptions a little in Get-RunningProcesses. Please test by using the 3.6.2 beta found under the "Source Code" tab of this site. I'm not sure if it will resolve your issues but please test and let me know.
Apr 13, 2015 at 10:34 AM
No change with your new version. The installation starts without prompting to close the application:

[04-07-2015 09:57:17.184] [Pre-Installation] [Get-RunningProcesses] :: Check for running application(s) [svrpgsoo]...
[04-07-2015 09:57:17.202] [Pre-Installation] [Get-RunningProcesses] :: The following processes are running: [svrpgsoo]
[04-07-2015 09:57:17.216] [Pre-Installation] [Get-RunningProcesses] :: Resolve process descriptions...
[04-07-2015 09:57:17.230] [Pre-Installation] [Get-RunningProcesses] :: Finished checking running application(s).
[04-07-2015 09:57:17.255] [Pre-Installation] [Show-BalloonTip] :: Display balloon tip notification with message [Installation gestartet.]
Apr 13, 2015 at 10:50 AM
I think I'm going to need to see the full log file to get some more details.
Apr 13, 2015 at 10:56 AM
PS Log output:

[04-13-2015 11:52:36.825] [Initialization] [PSAppDeployToolkit] :: *******************************************************************************
[04-13-2015 11:52:36.825] [Initialization] [PSAppDeployToolkit] :: *******************************************************************************
[04-13-2015 11:52:36.834] [Initialization] [PSAppDeployToolkit] :: [Infor_WinClient_3.02.69_MUI_01] setup started.
[04-13-2015 11:52:36.840] [Initialization] [PSAppDeployToolkit] :: Script [\domainname.local\sccmsources$\Programme\Infor\WinClient.3.02.69\AppDeployToolkit\AppDeployToolkitMain.ps1] dot-source invoked by [\domainname.local\sccmsources$\Programme\Infor\WinClient.3.02.69\Deploy-Application.ps1]
[04-13-2015 11:52:36.866] [Initialization] [PSAppDeployToolkitExt] :: Script [\domainname.local\sccmsources$\Programme\Infor\WinClient.3.02.69\AppDeployToolkit\AppDeployToolkitExtensions.ps1] dot-source invoked by [\domainname.local\sccmsources$\Programme\Infor\WinClient.3.02.69\AppDeployToolkit\AppDepl
[04-13-2015 11:52:36.872] [Initialization] [PSAppDeployToolkit] :: [Infor_WinClient_3.02.69_MUI_01] script version is [1.0.0]
[04-13-2015 11:52:36.876] [Initialization] [PSAppDeployToolkit] :: [Deploy Application] script version is [3.6.0]
[04-13-2015 11:52:36.880] [Initialization] [PSAppDeployToolkit] :: [App Deploy Toolkit Main] script version is [3.6.2]
[04-13-2015 11:52:36.884] [Initialization] [PSAppDeployToolkit] :: [App Deploy Toolkit Extensions] version is [1.5.0]
[04-13-2015 11:52:36.888] [Initialization] [PSAppDeployToolkit] :: Computer Name is [INT-WKS-0001.domainname.local]
[04-13-2015 11:52:36.892] [Initialization] [PSAppDeployToolkit] :: Current User is [DOMAINNAME\install]
[04-13-2015 11:52:36.896] [Initialization] [PSAppDeployToolkit] :: OS Version is [Microsoft Windows 8 Enterprise 64-bit 6.2.9200.0]
[04-13-2015 11:52:36.901] [Initialization] [PSAppDeployToolkit] :: OS Type is [Workstation]
[04-13-2015 11:52:36.907] [Initialization] [PSAppDeployToolkit] :: Current Culture is [de-AT] and UI language is [DE]
[04-13-2015 11:52:36.914] [Initialization] [Get-HardwarePlatform] :: Retrieve hardware platform information.
[04-13-2015 11:52:36.929] [Initialization] [PSAppDeployToolkit] :: Hardware Platform is [Physical]
[04-13-2015 11:52:36.937] [Initialization] [PSAppDeployToolkit] :: PowerShell Host is [ConsoleHost] with version [3.0]
[04-13-2015 11:52:36.942] [Initialization] [PSAppDeployToolkit] :: PowerShell Version is [3.0 x64]
[04-13-2015 11:52:36.946] [Initialization] [PSAppDeployToolkit] :: PowerShell CLR (.NET) version is [4.0.30319.18051]
[04-13-2015 11:52:36.950] [Initialization] [PSAppDeployToolkit] :: *******************************************************************************
[04-13-2015 11:52:36.959] [Initialization] [Get-LoggedOnUser] :: Get session information for all logged on users.
[04-13-2015 11:52:36.989] [Initialization] [Convert-RegistryPath] :: Return fully qualified registry key path [Registry::HKEY_USERS\S-1-5-21-3804986206-364069227-2459393369-1229\Control Panel\International\User Profile]
[04-13-2015 11:52:36.992] [Initialization] [Get-RegistryKey] :: Get registry key [Registry::HKEY_USERS\S-1-5-21-3804986206-364069227-2459393369-1229\Control Panel\International\User Profile] value [Languages]
[04-13-2015 11:52:37.001] [Initialization] [Convert-RegistryPath] :: Return fully qualified registry key path [Registry::HKEY_USERS\S-1-5-21-3804986206-364069227-2459393369-1229\Control Panel\Desktop]
[04-13-2015 11:52:37.005] [Initialization] [Get-RegistryKey] :: Get registry key [Registry::HKEY_USERS\S-1-5-21-3804986206-364069227-2459393369-1229\Control Panel\Desktop] value [LogPixels]
[04-13-2015 11:52:37.010] [Initialization] [PSAppDeployToolkit] :: Display session information for all logged on users:

NTAccount : DOMAINNAME\mario
SID : S-1-5-21-3804986206-364069227-2459393369-1229
UserName : mario
SessionId : 3
SessionName : Console
ConnectState : Active
IsCurrentSession : True
IsConsoleSession : True
IsUserSession : True
IsLocalAdmin : False
LogonTime : 13.04.2015 07:42:28
IdleTime : 2.23:13:51.0076842
DisconnectTime : 10.04.2015 12:31:36
ClientName :
ClientProtocolType :
ClientDirectory :
ClientBuildNumber : 0

[04-13-2015 11:52:37.021] [Initialization] [PSAppDeployToolkit] :: The following users are logged on to the system: DOMAINNAME\mario
[04-13-2015 11:52:37.046] [Initialization] [PSAppDeployToolkit] :: Current process is running under a user account [DOMAINNAME\mario]
[04-13-2015 11:52:37.050] [Initialization] [PSAppDeployToolkit] :: The following user is the console user [DOMAINNAME\mario] (user with control of physical monitor, keyboard, and mouse).
[04-13-2015 11:52:37.054] [Initialization] [PSAppDeployToolkit] :: The active logged on user is [DOMAINNAME\mario]
[04-13-2015 11:52:37.058] [Initialization] [PSAppDeployToolkit] :: The active logged on user [DOMAINNAME\mario] has a primary UI language of [DE].
[04-13-2015 11:52:37.063] [Initialization] [PSAppDeployToolkit] :: The active logged on user [DOMAINNAME\mario] has a DPI scale factor of [100] with DPI pixels [0].
[04-13-2015 11:52:37.067] [Initialization] [PSAppDeployToolkit] :: The process is running in a terminal server session: [False].
[04-13-2015 11:52:37.072] [Initialization] [PSAppDeployToolkit] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence.
[04-13-2015 11:52:37.076] [Initialization] [PSAppDeployToolkit] :: Skipping attempt to check for and make the task scheduler services healthy because the App Deployment Toolkit is not running under the [NT-AUTORITÄT\SYSTEM] account.
[04-13-2015 11:52:37.089] [Initialization] [PSAppDeployToolkit] :: Session 0 not detected.
[04-13-2015 11:52:37.094] [Initialization] [PSAppDeployToolkit] :: Installation is running in [Interactive] mode.
[04-13-2015 11:52:37.098] [Initialization] [PSAppDeployToolkit] :: Deployment type is [Installation]
[04-13-2015 11:52:37.111] [Pre-Installation] [Get-RunningProcesses] :: Check for running application(s) [svrpgsoo]...
[04-13-2015 11:52:37.125] [Pre-Installation] [Get-RunningProcesses] :: The following processes are running: [svrpgsoo]
[04-13-2015 11:52:37.131] [Pre-Installation] [Get-RunningProcesses] :: Resolve process descriptions...
[04-13-2015 11:52:37.138] [Pre-Installation] [Get-RunningProcesses] :: Finished checking running application(s).
[04-13-2015 11:52:37.156] [Pre-Installation] [Show-BalloonTip] :: Display balloon tip notification with message [Installation gestartet.]
[04-13-2015 11:52:37.264] [Pre-Installation] [Show-InstallationProgress] :: Spin up progress dialog in a separate thread with message: [Installation wird durchgeführt. Bitte warten...]
[04-13-2015 11:52:38.318] [Installation] [Copy-File] :: Copy file in path [\domainname.local\sccmsources$\Programme\Infor\WinClient.3.02.69\Files\Starticon] to destination [%ProgramData%\Microsoft\Windows\Start menu\Programs\Infor]
[04-13-2015 11:52:38.338] [Installation] [Copy-File] :: Copy file in path [\domainname.local\sccmsources$\Programme\Infor\WinClient.3.02.69\Files\Starticon] to destination [%Public%\desktop]
[04-13-2015 11:52:38.349] [Installation] [Execute-Process] :: [\domainname.local\sccmsources$\Programme\Infor\WinClient.3.02.69\Files\Setup.exe] is a valid fully qualified path, continue.
[04-13-2015 11:52:38.368] [Installation] [Execute-Process] :: Working Directory is [\domainname.local\sccmsources$\Programme\Infor\WinClient.3.02.69\Files]
[04-13-2015 11:52:38.374] [Installation] [Execute-Process] :: Executing [\domainname.local\sccmsources$\Programme\Infor\WinClient.3.02.69\Files\Setup.exe -s -f1"\domainname.local\sccmsources$\Programme\Infor\WinClient.3.02.69\Files\iss-x64setup\setup.iss"]...
Apr 14, 2015 at 3:03 AM
I figured out the problem. We will release a 3.6.2 version of the toolkit tomorrow which will have the fix included.
Apr 14, 2015 at 1:21 PM
Thanks a lot! Version 3.6.2 fixed my problem :-)