Windows Security Warning Message - Clicking Ok And Moving to Next Workflow

Hello, I need assist with Window Security Warning Message coming up. I need the UiPath activity to click “Run” button, however, it does not click on the “Run” button. Unfortunately, I cannot control the security settings so this message will appear each time most likely and if it appears I need to hit “Run” button. If it does not appear then I would like to continue with the next activity. Is there anyway to do this? I read bunch of community posts but unable to still fix this issue.

Here’s my workflow:

Open BAT File
Security Message Comes Up
Click the Run Button
BAT File runs and then opens Monarch Project from there

Here’s what I have done so far:



@nirmit.kansagra

is it getting stuck before coming to click?

or is it not identified?

also it is better to use a separate application scope for the pop up rather than using same use app/browser

If it is stuck before click only then try to use parallel activity with click on one side and opening application on the other side

cheers

As soon as the BAT file is launched, the windows security message comes up (UiPath Studio opens until then) and then it gets stuck where it does not click on the “Run” button (Stays on the security window). So what do you suggest in this case.

Also, are you suggesting something like this? Where my BAT file is the first thing it runs and at same time if that message comes up then it would click through it? I tried this but this doesnt work.

@nirmit.kansagra

when you say doesnt work what happens?does it get stuck or clicks and doesnt move or does not click

first thing please indicate the pop up as the window in use app/browser

try changing the opening to right and click to left..please use proper window

cheers

I updated the pop-up as window for both Use Application and Click and that definitely helped at least bring the “Open File - Security Warning” dialogue in the forefront as that was also another issue too where it was running on the back

The Open File - Security Warning dialogue box does not click on the “Run” button as you can see. I looked at the log and it shows as if it clicked on it but it did not. Basically, what happens is my BAT file script executes, then this Open File - Security Warning box appears and it just stays on this screen and it does not click on the “Run” button and this window just stays open as opposed to it clicking on the “Run” button which would run the BAT file

Also, if i am not following your recommendation correctly, could you please share screenshot like I did as I am new to UiPath so would be easier to learn and see what you mean exactly.

@nirmit.kansagra

Thats a good progress

Ok so its getting click as per log but you see it is jot

So can you try using hardware events in inout mode once

Also generally in parallel activity main activity would be kept of right and optional like click on run would be on the left

And did you give a condition in parallel

Cheers

Could you please clarify where you would like me to try the hardware events? In the Check App State when it clicks on the “Run” button?

So, this is just one of the workflow in my activity, i have many other stuff that needs to occur if this is successful. But my other workflows depends on the BAT file running successfully, which is why my BAT file is on left and other one on right.

also, can you clarify what you mean by giving condition in parallel please.

@nirmit.kansagra,

What’s behind the bat file is it powershell script, you can use Invoke PowerShell activity to execute the commands.

@nirmit.kansagra

For the click use hardware events

Parallel can end after click run

And for parallel activity you need to give a condution for it to end

Cheers

I tried your suggestion but it does not work :(. Also, what I am noticing is it is opening up another File Explorer window as well and does not click on the “Run” button. I also see that Open File - Security warning box does not always open in foreground

Any way to fix this, I really need this to work as this is really dependent on many of my other UI Projects. I also switched per your recommendation to move the Use Application activity on the left and my script BAT script on the right on the parallel activity. But please note my BAT script needs to start first and based on its execution my other workflows will work.

Furthermore, I am also getting Use Application Open File - Security Warning could not find the Ui Element corresponding to this sector error as well. I did update the Condition to True for Parallel activity. Also, I know in my previous post I had said it found the Open File - Security Warning, it is actually not finding it, I think i may had that open last time when i was executing. Bascially, the UiPath is not recognizing the Open File - Security Window that is opening up and therefore it is throwing error saying could not find the Ui element corresponding selector.

This is the script, it basically merges remit files and puts in proper format.

rem Create a batch script that will run an altair 2023 monarch utility task to Prepare Files for Monarch with source folder = c:\test and destination folder = c:\test\Monarch using format EDI (Auto-detect formatting characters and add a space for consecutive element/sub-element separators) and using output segment deliminator = ~ and output sub element separator = : and element separator = *

@echo off
setlocal enabledelayedexpansion
REM Batch script to run Altair 2023 Monarch utility task

REM Define source and destination folders
REM set SOURCE_FOLDER=C:\Automation\BHMG_OutgoingDriveN\PREPROCESSED
REM set DESTINATION_FOLDER=C:\Automation\BHMG_OutgoingDriveN\PREPROCESSED\Monarch

REM Define formatting options
set FORMAT=edi
set AUTO_DETECT_FORMATTING=–auto-detect-formatting
set ADD_SPACE_FOR_SEPARATORS=–add-space-for-separators
set OUTPUT_SEGMENT_DELIMINATOR=–output-segment-deliminator
set OUTPUT_SUB_ELEMENT_SEPARATOR=–output-sub-element-separator
set ELEMENT_SEPARATOR=–element-separator

REM Run the Monarch utility task
"C:\Program Files\Altair Monarch 2023"MonarchUtility.Automation.exe “\epic-nas.et1157.epichosted.com\xfr\prd\toODB\Claims\ExperianCHILDRENS835\Reports\Input” “-f:.” “\epic-nas.et1157.epichosted.com\xfr\prd\toODB\Claims\ExperianCHILDRENS835\Reports\Input\Monarch” /edi /osegd:~ /oelem:* /osube:: /addsp

REM Check if the task was successful
if %ERRORLEVEL% equ 0 (
echo Task completed successfully.
) else (
echo Task failed with error code %ERRORLEVEL%.
)

Del \epic-nas.et1157.epichosted.com\xfr\prd\toODB\Claims\ExperianCHILDRENS835\Reports\CHS_Remittance_Files.txt
REM Set the directory containing the text files
set “source_dir=\epic-nas.et1157.epichosted.com\xfr\prd\toODB\Claims\ExperianCHILDRENS835\Reports\Input\Monarch”

REM Set the output file
set “output_file=\epic-nas.et1157.epichosted.com\xfr\prd\toODB\Claims\ExperianCHILDRENS835\Reports\CHS_Remittance_Files.txt”

REM Clear the output file if it exists
if exist “%output_file%” del “%output_file%”

REM Loop through all .txt files in the directory. Print the File Name then on next series of lines copy the file contents
pushd “\epic-nas.et1157.epichosted.com\xfr\prd\toODB\Claims\ExperianCHILDRENS835\Reports
for %%F in (”%source_dir%*.*") do (
echo File Name = %%~nxF >> “%output_file%”
type “%%F” >> “%output_file%”
)

echo All text files merged successfully!
endlocal
rem pause

@nirmit.kansagra

if this the script to run the please go with invoke power shell directly

and regarding another window opening set the open property of use app broser to never for security window

cheers

I figured out the issue and how to solve this error (Thank you so much Anil for all the feedback you have provided otherwise I would not have made this far :)). I used this forum (How to bring window to focus).

Run the bot in debug mode, pause when it opens the application, then use UiExplorer to find the element.
After doing that, I found the following to be the selector information:

** wnd app=‘UiPath.executor.exe’ cls=‘#32770’ title=‘Open File - Security Warning’ **
** wnd ctrlid=‘4426’ title=‘&Run’ **

What I ended up doing is running the application and a click activity in parallel. The click has a DelayBefore of 200 (anything faster and it wouldn’t work properly) and I set the ClickType to CLICK_DOUBLE (Even though this article says double I did single). The double click is so it brings the window into focus and then clicks the button.

How to handle Windows Security Warning popup? - Help / Studio - UiPath Community Forum

I am including the detailed steps below with screenshot as this took lot of time to figure this out so anyone new to UiPath can reference these detail steps and use it :smile:

My issue was when I was using the Windows File Explorer activity, I was launching the security window and then selecting the selector, the thing is when you run it through the UiPath Studio, the selector actually changes which is why it was not recognizing my window

Note - You need to update the selector in following places:

Use Application
Check App State
Click Activity

Before -

After -

Use Parallel Activity, otherwise this will not work you can put it like how I did.

Also, make sure to do a delay before the click activity, this is very important otherwise it will not work. You will need at least 200 seconds.

Furthermore, another issue i was running into was it was opening up another windows explorer window to fix this I did following:

1 Like

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