<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic AutoIt Script for Barracuda GUI: &amp;quot;Failed to open process (process id: xxx)&amp;quot; in PAM Self-Hosted Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338563#M33735</link>
    <description>&lt;P&gt;I've created an AutoIt script to automate login to the Barracuda Firewall Admin GUI using credentials fetched from CyberArk. After numerous attempts, the script successfully connected to the Barracuda firewall and filled in the credentials on the first run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I try to connect again, the script fails to fill in the credentials, and I receive the error: &lt;B&gt;Failed to open process (process id: xxx)&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;PS&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Barracuda Admin is not a traditional installable app — it's a self-contained GUI executable. It just opens directly and allows credential entry.&lt;/P&gt;&lt;P&gt;When testing manually, &lt;B&gt;Run()&lt;/B&gt; didn’t work to launch it. So I used &lt;B&gt;ShellExecute() &lt;/B&gt;, and it worked fine.&lt;/P&gt;&lt;P&gt;Oddly, when running the script via CyberArk, Run() works, and the Barracuda GUI opens correctly.&lt;/P&gt;&lt;P&gt;However, after Barracuda opens, I get the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="068Vy00000WBCufIAH.jpg"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/92299iCA59D992A0003101/image-size/large?v=v2&amp;amp;px=999" role="button" title="068Vy00000WBCufIAH.jpg" alt="068Vy00000WBCufIAH.jpg" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Here is the script I'm using:&lt;/B&gt;&lt;/P&gt;&lt;P&gt;;=======================================&lt;/P&gt;&lt;P&gt;; Main&lt;/P&gt;&lt;P&gt;;=======================================&lt;/P&gt;&lt;P&gt;Func Main()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	; Init PSM Dispatcher utils wrapper&lt;/P&gt;&lt;P&gt;	ToolTip ("Initializing...")&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_Init() &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt; Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	LogWrite("successfully initialized Dispatcher Utils Wrapper")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	; Get the dispatcher parameters&lt;/P&gt;&lt;P&gt;	FetchSessionProperties()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	LogWrite("mapping local drives")&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_MapTSDrives() &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt; Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	LogWrite("starting client application")&lt;/P&gt;&lt;P&gt;	ToolTip ("Starting " &amp;amp; $DISPATCHER_NAME &amp;amp; "...")&lt;/P&gt;&lt;P&gt;	$ConnectionClientPID = Run($CLIENT_EXECUTABLE)&lt;/P&gt;&lt;P&gt;	if ($ConnectionClientPID == 0) Then&lt;/P&gt;&lt;P&gt; Error(StringFormat("Failed to execute process [%s]", $CLIENT_EXECUTABLE, @error))&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;	; Launch the application&lt;/P&gt;&lt;P&gt;	Run($CLIENT_EXECUTABLE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;; Wait for the window to appear&lt;/P&gt;&lt;P&gt;	WinWait("Barracuda Firewall Admin 9.0 - New Session", "", 30)&lt;/P&gt;&lt;P&gt;	Sleep(3000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	If WinExists("Barracuda Firewall Admin 9.0 - New Session") Then&lt;/P&gt;&lt;P&gt;	Send($TargetAddress)&lt;/P&gt;&lt;P&gt;	Send("{TAB}")&lt;/P&gt;&lt;P&gt;	Send($TargetUsername)&lt;/P&gt;&lt;P&gt;	Send("{TAB}")&lt;/P&gt;&lt;P&gt;	Send($TargetPassword)&lt;/P&gt;&lt;P&gt;	Send("{ENTER}")&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;	Else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;MsgBox(16, "Error", "Login window NOT found.")&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	; ------------------&lt;/P&gt;&lt;P&gt;	; Handle login here! ; CHANGE_ME&lt;/P&gt;&lt;P&gt;	; ------------------&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;	; Send PID to PSM so recording/monitoring can begin&lt;/P&gt;&lt;P&gt;	; Notice that until we send the PID, PSM blocks all user input.&lt;/P&gt;&lt;P&gt;	LogWrite("sending PID to PSM")&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_SendPID($ConnectionClientPID) &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt; Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	; Terminate PSM Dispatcher utils wrapper&lt;/P&gt;&lt;P&gt;	LogWrite("Terminating Dispatcher Utils Wrapper")&lt;/P&gt;&lt;P&gt;	PSMGenericClient_Term()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	Return $PSM_ERROR_SUCCESS&lt;/P&gt;&lt;P&gt;EndFunc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;;==================================&lt;/P&gt;&lt;P&gt;; Functions&lt;/P&gt;&lt;P&gt;;==================================&lt;/P&gt;&lt;P&gt;; #FUNCTION# ====================================================================================================================&lt;/P&gt;&lt;P&gt;; Name...........: Error&lt;/P&gt;&lt;P&gt;; Description ...: An exception handler - displays an error message and terminates the dispatcher&lt;/P&gt;&lt;P&gt;; Parameters ....: $ErrorMessage - Error message to display&lt;/P&gt;&lt;P&gt;;&amp;nbsp;&amp;nbsp;$Code - [Optional] Exit error code&lt;/P&gt;&lt;P&gt;; ===============================================================================================================================&lt;/P&gt;&lt;P&gt;Func Error($ErrorMessage, $Code = -1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	; If the dispatcher utils DLL was already initialized, write an error log message and terminate the wrapper&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_IsInitialized()) Then&lt;/P&gt;&lt;P&gt; LogWrite($ErrorMessage, True)&lt;/P&gt;&lt;P&gt; PSMGenericClient_Term()&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	Local $MessageFlags = BitOr(0, 16, 262144) ; 0=OK button, 16=Stop-sign icon, 262144=MsgBox has top-most attribute set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	MsgBox($MessageFlags, $ERROR_MESSAGE_TITLE, $ErrorMessage)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	; If the connection component was already invoked, terminate it&lt;/P&gt;&lt;P&gt;	if ($ConnectionClientPID &amp;lt;&amp;gt; 0) Then&lt;/P&gt;&lt;P&gt; ProcessClose($ConnectionClientPID)&lt;/P&gt;&lt;P&gt; $ConnectionClientPID = 0&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	Exit $Code&lt;/P&gt;&lt;P&gt;EndFunc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;; #FUNCTION# ====================================================================================================================&lt;/P&gt;&lt;P&gt;; Name...........: LogWrite&lt;/P&gt;&lt;P&gt;; Description ...: Write a PSMWinSCPDispatcher log message to standard PSM log file&lt;/P&gt;&lt;P&gt;; Parameters ....: $sMessage - [IN] The message to write&lt;/P&gt;&lt;P&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$LogLevel - [Optional] [IN] Defined if the message should be handled as an error message or as a trace messge&lt;/P&gt;&lt;P&gt;; Return values .: $PSM_ERROR_SUCCESS - Success, otherwise error - Use PSMGenericClient_PSMGetLastErrorString for details.&lt;/P&gt;&lt;P&gt;; ===============================================================================================================================&lt;/P&gt;&lt;P&gt;Func LogWrite($sMessage, $LogLevel = $LOG_LEVEL_TRACE)&lt;/P&gt;&lt;P&gt;	Return PSMGenericClient_LogWrite($LOG_MESSAGE_PREFIX &amp;amp; $sMessage, $LogLevel)&lt;/P&gt;&lt;P&gt;EndFunc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;; #FUNCTION# ====================================================================================================================&lt;/P&gt;&lt;P&gt;; Name...........: PSMGenericClient_GetSessionProperty&lt;/P&gt;&lt;P&gt;; Description ...: Fetches properties required for the session&amp;nbsp;&lt;/P&gt;&lt;P&gt;; Parameters ....: None&lt;/P&gt;&lt;P&gt;; Return values .: None&lt;/P&gt;&lt;P&gt;; ===============================================================================================================================&lt;/P&gt;&lt;P&gt;Func FetchSessionProperties() ; CHANGE_ME&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_GetSessionProperty("Username", $TargetUsername) &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt; Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_GetSessionProperty("Password", $TargetPassword) &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt; Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_GetSessionProperty("Address", $TargetAddress) &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt; Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;EndFunc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone faced a similar issue or can help identify what might be going wrong?&lt;/P&gt;&lt;P&gt;Any insights or suggestions would be greatly appreciated!&lt;/P&gt;</description>
    <pubDate>Thu, 08 May 2025 11:06:00 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2025-05-08T11:06:00Z</dc:date>
    <item>
      <title>AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338563#M33735</link>
      <description>&lt;P&gt;I've created an AutoIt script to automate login to the Barracuda Firewall Admin GUI using credentials fetched from CyberArk. After numerous attempts, the script successfully connected to the Barracuda firewall and filled in the credentials on the first run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I try to connect again, the script fails to fill in the credentials, and I receive the error: &lt;B&gt;Failed to open process (process id: xxx)&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;PS&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Barracuda Admin is not a traditional installable app — it's a self-contained GUI executable. It just opens directly and allows credential entry.&lt;/P&gt;&lt;P&gt;When testing manually, &lt;B&gt;Run()&lt;/B&gt; didn’t work to launch it. So I used &lt;B&gt;ShellExecute() &lt;/B&gt;, and it worked fine.&lt;/P&gt;&lt;P&gt;Oddly, when running the script via CyberArk, Run() works, and the Barracuda GUI opens correctly.&lt;/P&gt;&lt;P&gt;However, after Barracuda opens, I get the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="068Vy00000WBCufIAH.jpg"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/92299iCA59D992A0003101/image-size/large?v=v2&amp;amp;px=999" role="button" title="068Vy00000WBCufIAH.jpg" alt="068Vy00000WBCufIAH.jpg" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Here is the script I'm using:&lt;/B&gt;&lt;/P&gt;&lt;P&gt;;=======================================&lt;/P&gt;&lt;P&gt;; Main&lt;/P&gt;&lt;P&gt;;=======================================&lt;/P&gt;&lt;P&gt;Func Main()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	; Init PSM Dispatcher utils wrapper&lt;/P&gt;&lt;P&gt;	ToolTip ("Initializing...")&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_Init() &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt; Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	LogWrite("successfully initialized Dispatcher Utils Wrapper")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	; Get the dispatcher parameters&lt;/P&gt;&lt;P&gt;	FetchSessionProperties()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	LogWrite("mapping local drives")&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_MapTSDrives() &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt; Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	LogWrite("starting client application")&lt;/P&gt;&lt;P&gt;	ToolTip ("Starting " &amp;amp; $DISPATCHER_NAME &amp;amp; "...")&lt;/P&gt;&lt;P&gt;	$ConnectionClientPID = Run($CLIENT_EXECUTABLE)&lt;/P&gt;&lt;P&gt;	if ($ConnectionClientPID == 0) Then&lt;/P&gt;&lt;P&gt; Error(StringFormat("Failed to execute process [%s]", $CLIENT_EXECUTABLE, @error))&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;	; Launch the application&lt;/P&gt;&lt;P&gt;	Run($CLIENT_EXECUTABLE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;; Wait for the window to appear&lt;/P&gt;&lt;P&gt;	WinWait("Barracuda Firewall Admin 9.0 - New Session", "", 30)&lt;/P&gt;&lt;P&gt;	Sleep(3000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	If WinExists("Barracuda Firewall Admin 9.0 - New Session") Then&lt;/P&gt;&lt;P&gt;	Send($TargetAddress)&lt;/P&gt;&lt;P&gt;	Send("{TAB}")&lt;/P&gt;&lt;P&gt;	Send($TargetUsername)&lt;/P&gt;&lt;P&gt;	Send("{TAB}")&lt;/P&gt;&lt;P&gt;	Send($TargetPassword)&lt;/P&gt;&lt;P&gt;	Send("{ENTER}")&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;	Else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;MsgBox(16, "Error", "Login window NOT found.")&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	; ------------------&lt;/P&gt;&lt;P&gt;	; Handle login here! ; CHANGE_ME&lt;/P&gt;&lt;P&gt;	; ------------------&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;	; Send PID to PSM so recording/monitoring can begin&lt;/P&gt;&lt;P&gt;	; Notice that until we send the PID, PSM blocks all user input.&lt;/P&gt;&lt;P&gt;	LogWrite("sending PID to PSM")&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_SendPID($ConnectionClientPID) &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt; Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	; Terminate PSM Dispatcher utils wrapper&lt;/P&gt;&lt;P&gt;	LogWrite("Terminating Dispatcher Utils Wrapper")&lt;/P&gt;&lt;P&gt;	PSMGenericClient_Term()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	Return $PSM_ERROR_SUCCESS&lt;/P&gt;&lt;P&gt;EndFunc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;;==================================&lt;/P&gt;&lt;P&gt;; Functions&lt;/P&gt;&lt;P&gt;;==================================&lt;/P&gt;&lt;P&gt;; #FUNCTION# ====================================================================================================================&lt;/P&gt;&lt;P&gt;; Name...........: Error&lt;/P&gt;&lt;P&gt;; Description ...: An exception handler - displays an error message and terminates the dispatcher&lt;/P&gt;&lt;P&gt;; Parameters ....: $ErrorMessage - Error message to display&lt;/P&gt;&lt;P&gt;;&amp;nbsp;&amp;nbsp;$Code - [Optional] Exit error code&lt;/P&gt;&lt;P&gt;; ===============================================================================================================================&lt;/P&gt;&lt;P&gt;Func Error($ErrorMessage, $Code = -1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	; If the dispatcher utils DLL was already initialized, write an error log message and terminate the wrapper&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_IsInitialized()) Then&lt;/P&gt;&lt;P&gt; LogWrite($ErrorMessage, True)&lt;/P&gt;&lt;P&gt; PSMGenericClient_Term()&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	Local $MessageFlags = BitOr(0, 16, 262144) ; 0=OK button, 16=Stop-sign icon, 262144=MsgBox has top-most attribute set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	MsgBox($MessageFlags, $ERROR_MESSAGE_TITLE, $ErrorMessage)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	; If the connection component was already invoked, terminate it&lt;/P&gt;&lt;P&gt;	if ($ConnectionClientPID &amp;lt;&amp;gt; 0) Then&lt;/P&gt;&lt;P&gt; ProcessClose($ConnectionClientPID)&lt;/P&gt;&lt;P&gt; $ConnectionClientPID = 0&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	Exit $Code&lt;/P&gt;&lt;P&gt;EndFunc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;; #FUNCTION# ====================================================================================================================&lt;/P&gt;&lt;P&gt;; Name...........: LogWrite&lt;/P&gt;&lt;P&gt;; Description ...: Write a PSMWinSCPDispatcher log message to standard PSM log file&lt;/P&gt;&lt;P&gt;; Parameters ....: $sMessage - [IN] The message to write&lt;/P&gt;&lt;P&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$LogLevel - [Optional] [IN] Defined if the message should be handled as an error message or as a trace messge&lt;/P&gt;&lt;P&gt;; Return values .: $PSM_ERROR_SUCCESS - Success, otherwise error - Use PSMGenericClient_PSMGetLastErrorString for details.&lt;/P&gt;&lt;P&gt;; ===============================================================================================================================&lt;/P&gt;&lt;P&gt;Func LogWrite($sMessage, $LogLevel = $LOG_LEVEL_TRACE)&lt;/P&gt;&lt;P&gt;	Return PSMGenericClient_LogWrite($LOG_MESSAGE_PREFIX &amp;amp; $sMessage, $LogLevel)&lt;/P&gt;&lt;P&gt;EndFunc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;; #FUNCTION# ====================================================================================================================&lt;/P&gt;&lt;P&gt;; Name...........: PSMGenericClient_GetSessionProperty&lt;/P&gt;&lt;P&gt;; Description ...: Fetches properties required for the session&amp;nbsp;&lt;/P&gt;&lt;P&gt;; Parameters ....: None&lt;/P&gt;&lt;P&gt;; Return values .: None&lt;/P&gt;&lt;P&gt;; ===============================================================================================================================&lt;/P&gt;&lt;P&gt;Func FetchSessionProperties() ; CHANGE_ME&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_GetSessionProperty("Username", $TargetUsername) &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt; Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_GetSessionProperty("Password", $TargetPassword) &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt; Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;	if (PSMGenericClient_GetSessionProperty("Address", $TargetAddress) &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt; Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;	EndIf&lt;/P&gt;&lt;P&gt;EndFunc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone faced a similar issue or can help identify what might be going wrong?&lt;/P&gt;&lt;P&gt;Any insights or suggestions would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 11:06:00 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338563#M33735</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-05-08T11:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338564#M33736</link>
      <description>&lt;P&gt;I would recommend removing the duplicate of running the client executable. most probably the application doesn't support multiple instances and therefore you receive the error. try removing the part below and rerun again:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;; Launch the application&lt;/P&gt;&lt;P&gt;Run($CLIENT_EXECUTABLE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="068Vy00000WB95cIAD.jpg"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/92297i4B1B720E86814197/image-size/large?v=v2&amp;amp;px=999" role="button" title="068Vy00000WB95cIAD.jpg" alt="068Vy00000WB95cIAD.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 11:37:32 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338564#M33736</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-05-08T11:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338565#M33737</link>
      <description>&lt;P&gt;Hello @Bellatrix Lestrange​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you received an answer to your question? If so, we kindly encourage you to share it with us.&lt;/P&gt;&lt;P&gt;Your insights could be valuable to other community members in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, Isar.&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 07:02:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338565#M33737</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-05-22T07:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338566#M33738</link>
      <description>&lt;P&gt;Changed the script and it worked. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Global Const $DISPATCHER_NAME = "PSMBarracuda"&lt;/P&gt;&lt;P&gt;Global Const $CLIENT_EXECUTABLE = "C:\Tools\FirewallAdmin_9.0.0-277.exe"&lt;/P&gt;&lt;P&gt;Global Const $ERROR_MESSAGE_TITLE = "PSM " &amp;amp; $DISPATCHER_NAME &amp;amp; " Dispatcher Error"&lt;/P&gt;&lt;P&gt;Global Const $LOG_MESSAGE_PREFIX = $DISPATCHER_NAME &amp;amp; " Dispatcher - "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Global $TargetAddress, $TargetUsername, $TargetPassword&lt;/P&gt;&lt;P&gt;Global $ConnectionClientPID = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exit Main()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Func Main()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;If (PSMGenericClient_Init() &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;FetchSessionProperties()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;If (PSMGenericClient_MapTSDrives() &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;ShellExecute($CLIENT_EXECUTABLE) ; Launch app normally&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;; Wait for login window&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;WinWait("Barracuda Firewall Admin 9.0 - New Session", "", 20)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;Local $hWnd = WinGetHandle("Barracuda Firewall Admin 9.0 - New Session")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;If $hWnd = 0 Then Error("Login window NOT found.")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;Sleep(1000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;; Get actual process PID of the GUI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;$ConnectionClientPID = WinGetProcess($hWnd)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;If $ConnectionClientPID = 0 Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Error("Could not get PID of the GUI process.")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;EndIf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;; Fill credentials&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;WinActivate($hWnd)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;Send($TargetAddress)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;Send("{TAB}")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;Send($TargetUsername)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;Send("{TAB}")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;Send($TargetPassword)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;Send("{ENTER}")&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 09 Jun 2025 05:22:20 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338566#M33738</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-06-09T05:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338567#M33739</link>
      <description>&lt;P&gt;@Bellatrix Lestrange​&amp;nbsp;, please be aware that in your changed script, you don't send the PID to the PSM and it will cause session not being monitored and recorded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would include the following to capture the session before filling credentials:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LogWrite("sending PID to PSM")&lt;/P&gt;&lt;P&gt;if (PSMGenericClient_SendPID($ConnectionClientPID) &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then&lt;/P&gt;&lt;P&gt;Error(PSMGenericClient_PSMGetLastErrorString())&lt;/P&gt;&lt;P&gt;EndIf&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 13:13:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338567#M33739</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-06-10T13:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338568#M33740</link>
      <description>&lt;P&gt;Thank You! But whenever iam trying to give PID it throws error- "PSMSR163E failed to open process( process id: xxxxxx)"&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 04:35:35 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338568#M33740</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-06-11T04:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338569#M33741</link>
      <description>&lt;P&gt;Some generic questions related to the environment:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Do you compile this script to exe file and run as exe or you invoke it via Autoit?&lt;/LI&gt;&lt;LI&gt;Is PSM hardened? If so, are web applications hardened?&lt;/LI&gt;&lt;LI&gt;Is applocker turned on and in enforced mode? If so, have you added Autoit or your compiled exe to the applocker rule to be whitelisted?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 04:57:31 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338569#M33741</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-06-11T04:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338570#M33742</link>
      <description>&lt;OL&gt;&lt;LI&gt;Autoit&lt;/LI&gt;&lt;LI&gt;Yes &amp;amp; Yes&lt;/LI&gt;&lt;LI&gt;Audit Mode&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Wed, 11 Jun 2025 05:24:05 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338570#M33742</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-06-11T05:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338571#M33743</link>
      <description>&lt;P&gt;But without sending PID, connector works fine. right?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 05:36:15 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338571#M33743</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-06-11T05:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338572#M33744</link>
      <description>&lt;P&gt;Yes&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 15:57:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338572#M33744</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-06-19T15:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338573#M33745</link>
      <description>&lt;P&gt;strange. Better to turn on trace mode fo Connnection Client Settings and the PSM itself and debug this connection. there should definitely be something that points out to the reason&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 07:15:25 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338573#M33745</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-06-20T07:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338574#M33746</link>
      <description>&lt;P&gt;Hi @Bellatrix Lestrange​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you whitelisted Barracuda executable&amp;nbsp;from AppLocker rules ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And sometimes the window is present, but its process is still initializing or loading its dependencies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try adding a longer delay after WinWait()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 12:08:21 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338574#M33746</guid>
      <dc:creator>M.Vora780263</dc:creator>
      <dc:date>2025-06-20T12:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338575#M33747</link>
      <description>&lt;P&gt;As of now the session is recording. &lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 04:37:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338575#M33747</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-06-23T04:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: AutoIt Script for Barracuda GUI: "Failed to open process (process id: xxx)"</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338576#M33748</link>
      <description>&lt;P&gt;what made it working? &lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 06:42:46 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/autoit-script-for-barracuda-gui-quot-failed-to-open-process/m-p/1338576#M33748</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-06-23T06:42:46Z</dc:date>
    </item>
  </channel>
</rss>

