PSMSessionAlert.exe – “This application could not be started” popup when launching SCCM through AutoIt PSM Connection Component

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PSMSessionAlert.exe – “This application could not be started” popup when launching SCCM through AutoIt PSM Connection Component

L2 Linker

Field_Content_versions_oct20__068Vy00001oDQfMIAW.pngHi Team,

We have developed a custom AutoIt script to launch SCCM through a CyberArk PSM connection component.

When the PSM session is launched, the SCCM application opens successfully, but we immediately get the following popup in the background:

PSMSessionAlert.exe – “This application could not be started”

The popup remains behind the SCCM application and becomes visible only when SCCM is minimized.

Could anyone please help us understand:

  • What triggers PSMSessionAlert.exe in this scenario?
  • Why is it failing while the SCCM application itself launches successfully?
  • What logs/configuration should we check to identify the root cause?
  • Is there a recommended solution to prevent this popup?

Thanks in advance for your help.

8 REPLIES 8

L3 Networker

Without seeing the script it will be hard to help troubleshooting

Hi @Norbert Bohusch​ please find the AutoIt script below.

This is the complete script we are using for the SCCM PSM Connection Component. Please let me know if you need any additional logs or configuration details for troubleshooting.

#AutoIt3Wrapper_UseX64=Y

Opt("MustDeclareVars", 1)

AutoItSetOption("WinTitleMatchMode", 3) ; EXACT_MATCH!

 

;============================================================

;       PSM AutoIt Dispatcher Skeleton

;       ------------------------------

;

; Use this skeleton to create your own

; connection components integrated with the PSM.

; Areas you may want to modify are marked

; with the string "CHANGE_ME".

;

; Created : April 2013

; Cyber-Ark Software Ltd.

;============================================================

#include "PSMGenericClientWrapper.au3"

 

;=======================================

; Consts & Globals

;=======================================

Global Const $DISPATCHER_NAME = "PSMAutoItDispatcher_SCCM"

Global Const $CLIENT_EXECUTABLE = "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\Microsoft.ConfigurationManagement.exe"

Global Const $CLIENT_WORKING_DIR = "C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin"

Global Const $ERROR_MESSAGE_TITLE = "PSM " & $DISPATCHER_NAME & " Dispatcher error message"

Global Const $LOG_MESSAGE_PREFIX = $DISPATCHER_NAME & " Dispatcher - "

 

Global $TargetUsername

Global $TargetPassword

Global $TargetAddress

Global $TargetLogonDomain

Global $ConnectionClientPID = 0

 

;=======================================

; Code

;=======================================

Exit Main()

 

;=======================================

; Main

;=======================================

Func Main()

 

; Init PSM Dispatcher utils wrapper

ToolTip ("Initializing...")

if (PSMGenericClient_Init() <> $PSM_ERROR_SUCCESS) Then

Error(PSMGenericClient_PSMGetLastErrorString())

EndIf

 

LogWrite("successfully initialized Dispatcher Utils Wrapper")

 

; Get the dispatcher parameters

FetchSessionProperties()

 

LogWrite("mapping local drives")

if (PSMGenericClient_MapTSDrives() <> $PSM_ERROR_SUCCESS) Then

Error(PSMGenericClient_PSMGetLastErrorString())

EndIf

 

LogWrite("starting client application")

ToolTip ("Starting " & $DISPATCHER_NAME & "...")

 

 

; ------------------

; Handle login here! ; CHANGE_ME

; ------------------

  LogWrite("Starting SCCM client application")

  ToolTip("Starting SCCM Console...")

 

    $ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,1, '"' & $CLIENT_EXECUTABLE)

 

if ($ConnectionClientPID == 0) Then

Error(StringFormat("Failed to execute process [%s]", $CLIENT_EXECUTABLE, @error))

EndIf

 

; Send PID to PSM so recording/monitoring can begin

; Notice that until we send the PID, PSM blocks all user input.

LogWrite("sending PID to PSM")

if (PSMGenericClient_SendPID($ConnectionClientPID) <> $PSM_ERROR_SUCCESS) Then

Error(PSMGenericClient_PSMGetLastErrorString())

EndIf

 

; Terminate PSM Dispatcher utils wrapper

LogWrite("Terminating Dispatcher Utils Wrapper")

PSMGenericClient_Term()

 

Return $PSM_ERROR_SUCCESS

EndFunc

 

;==================================

; Functions

;==================================

; #FUNCTION# ====================================================================================================================

; Name...........: Error

; Description ...: An exception handler - displays an error message and terminates the dispatcher

; Parameters ....: $ErrorMessage - Error message to display

;   $Code - [Optional] Exit error code

; ===============================================================================================================================

Func Error($ErrorMessage, $Code = -1)

 

; If the dispatcher utils DLL was already initialized, write an error log message and terminate the wrapper

if (PSMGenericClient_IsInitialized()) Then

LogWrite($ErrorMessage, True)

PSMGenericClient_Term()

EndIf

 

Local $MessageFlags = BitOr(0, 16, 262144) ; 0=OK button, 16=Stop-sign icon, 262144=MsgBox has top-most attribute set

 

MsgBox($MessageFlags, $ERROR_MESSAGE_TITLE, $ErrorMessage)

 

; If the connection component was already invoked, terminate it

if ($ConnectionClientPID <> 0) Then

ProcessClose($ConnectionClientPID)

$ConnectionClientPID = 0

EndIf

 

Exit $Code

EndFunc

 

; #FUNCTION# ====================================================================================================================

; Name...........: LogWrite

; Description ...: Write a PSMWinSCPDispatcher log message to standard PSM log file

; Parameters ....: $sMessage - [IN] The message to write

;         $LogLevel - [Optional] [IN] Defined if the message should be handled as an error message or as a trace messge

; Return values .: $PSM_ERROR_SUCCESS - Success, otherwise error - Use PSMGenericClient_PSMGetLastErrorString for details.

; ===============================================================================================================================

Func LogWrite($sMessage, $LogLevel = $LOG_LEVEL_TRACE)

Return PSMGenericClient_LogWrite($LOG_MESSAGE_PREFIX & $sMessage, $LogLevel)

EndFunc

 

; #FUNCTION# ====================================================================================================================

; Name...........: PSMGenericClient_GetSessionProperty

; Description ...: Fetches properties required for the session

; Parameters ....: None

; Return values .: None

; ===============================================================================================================================

Func FetchSessionProperties() ; CHANGE_ME

if (PSMGenericClient_GetSessionProperty("Username", $TargetUsername) <> $PSM_ERROR_SUCCESS) Then

Error(PSMGenericClient_PSMGetLastErrorString())

EndIf

 

if (PSMGenericClient_GetSessionProperty("Password", $TargetPassword) <> $PSM_ERROR_SUCCESS) Then

Error(PSMGenericClient_PSMGetLastErrorString())

EndIf

 

if (PSMGenericClient_GetSessionProperty("Address", $TargetAddress) <> $PSM_ERROR_SUCCESS) Then

Error(PSMGenericClient_PSMGetLastErrorString())

EndIf

 

    if (PSMGenericClient_GetSessionProperty("LogonDomain", $TargetLogonDomain) <> $PSM_ERROR_SUCCESS) Then

Error(PSMGenericClient_PSMGetLastErrorString())

EndIf

EndFunc

It might be that the process which is started by the RunAs has a different PID then the finally running process of the SCCM client.

And it might not catch that properly for monitoring.

I checked the PID in both Task Manager and the PSM Connection Component logs.

The PID returned for the SCCM process is the same in both Task Manager and the Connection Component logs.

So, based on this check, the PID returned by

RunAs()

appears to be the same as the actual running SCCM process.

Please let me know if there is anything else I should check regarding the PID or process monitoring.

Is there a reason for this " you add to the Client-Executable in the RunAs?

$ConnectionClientPID = RunAs($TargetUsername,$TargetLogonDomain,$TargetPassword,1, '"' & $CLIENT_EXECUTABLE)

 

First of all the variable is already a string, second you only have a starting double-quote but no ending one.

 

I removed the additional double quote and changed the line to:

$ConnectionClientPID = RunAs($TargetUsername, $TargetLogonDomain, $TargetPassword, 1, $CLIENT_EXECUTABLE)

I tested the connection component again, but the behavior is still the same. SCCM launches successfully, and the

PSMSessionAlert.exe – This application could not be started

popup still appears.

So the quote does not appear to be the cause of the popup.

Could you please advise what else we should check?

L3 Networker

The only question which comes to my mind is if you are testing as a Connection-Component already or if you started it manually with AutoIT from CLI (https://community.cyberark.com/s/article/00004913)? I would recommend the 2nd option.

Else I have no idea.

 

We are currently testing the AutoIt script through the PSM Connection Component, and the PSMSessionAlert.exe – The application could not be started popup occurs only in that scenario.

The target application itself launches successfully despite the popup appearing in the background.

We also tested launching the AutoIt script manually from CLI, as suggested in the article. In that test, the application launched successfully without the popup.

However, we have not yet performed the exact CLI test from the PSM component server using the PSM Shadow User session as described in the article, because we would need to reset/recreate the Shadow User password to perform that test.

Based on the current testing:

  • PSM Connection Component → Application launches, but PSMSessionAlert.exe popup appears.
  • Normal CLI execution → Application launches successfully, no popup.
  • PSM Shadow User CLI test → Not yet performed.

Would the PSM Shadow User CLI test be necessary to further isolate whether the issue is related to the PSM session/Shadow User context or the Connection Component configuration?

Thanks!

  • 62 Views
  • 8 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!