cancel
Showing results for 
Search instead for 
Did you mean: 

Attach to User Account Control Window

TimsySangal
Level 4
Hi All,

I am trying to run a powershell command that opens a configuration file.After the command gets executed ,a User Account Control(UAC) window shows up.I have to select the "Yes" option on this window and only then does the file open.I have set the UAC notification setting to notify(Do not dim screen).I am not able to attach to this window using the window title(i have tried using wildcards also) or the process name(consent.exe).

When I set the UAC notification settings to Never Notify,the process works fine.But i don't want to change the notification settings.

Please help.
18 REPLIES 18

arshad.ziard
Level 3
Hi,
Thank you for posting your question on Blue Prism Community.
Attaching to Windows Security Popups while automating a different application can be tricky. However, when attaching to an existing applications, you can consider passing the PID (Process ID) as well, in addition to the Process name and Window title to see if it works.

Also, please make sure that you are only passing "consent" as the Process name, not "consent.exe". Furthermore, please double check that you attempting to attach to the correct Process.

If neither of these work, alternate solution would be to use Global Send Key Events action and pass the required keystrokes through to the target application and it will end navigating the popup window, as it will be the Foreground window at the time. As you may be aware, Global Send Key Event target whichever the Active window and it does not necessarily have to be the target application.

Hope this information helps.

Kind regards,
Arshad
Customer Support Engineer

------------------------------
Arshad Ziard
Customer Support Engineer
Blue Prism
Australia/Sydney
------------------------------

​"...passing the PID (Process ID)..."
How do I get the PID?

Navigation stage action Launch does not have any return value.
Neither is there any action I could find to query the PID via Application Modeller

Utility object Start Process does not return any PID.

The only way I now can think of now is to use Windows commands. Or do I miss something?

------------------------------
Walter Koller
Solution Manager
Erste Group IT International GmbH
Europe/Vienna
------------------------------

You can attach by process name. The process name can be found in task manager and then you can attach to an existin e.g .exe or app as you have and only by adding the name of the process e.g notepad*. 

The process ID can be found by running the C# code

Process currentProcess = Process.GetCurrentProcess();
string pid = Process.Id.ToString();

You can find more info on the Microsoft Page here
https://social.msdn.microsoft.com/Forums/vstudio/en-US/3f41c91e-b0f6-4a21-b421-961a9f2dca5e/getting-process-id-of-a-my-running-process?forum=csharpgeneral

------------------------------
Cohen
Romania
------------------------------

Hi Walter,

You can get the process id from Blue Prism by using the action "Get Process PID" in the object,Utility-Environment.

Hope it helps.


------------------------------
Consultant
Capgemini
------------------------------

Hi Arshad,

Thank you for the prompt response.I tried attaching to the pop-up window using the window title,process name and the PID but was not successful.I get an error message saying-"target application could not be identified" or "Could not open the target application".

I used the alternate approach also by attaching to the powershell window.The highlighted window is the Powershell window and the pop up is not activated.I sent mouse clicks to the pop up to activate it and then to the "Yes" button to click it.After the clicks are sent to the pop up window,it still does not get highlighted and does not throw any errors also.Also,the "yes" button gets highlighted but the click is not happening.

Please suggest.

------------------------------
Consultant
Capgemini
------------------------------

Hi John,

Thank you for your response.

The process name of the User Active Control pop-up is consent.exe.I checked the same from task manager.I was able to get the PID of this window from the action "Get process PID" in the "Utility-Environment" object.I passed both these in the attach action but got an error saying-"Could not open the target application"

Please suggest.


------------------------------
Consultant
Capgemini
------------------------------

Ok, if it gets highlighted is good. Try to use Global Send Keys with {TAB}. Sometimes you can identify the button with TAB. Tab is verry handy with these type of programs. Use the program in your fgavor by seeing what tab does. Sometimes you need to do 2 TAB keys to unlock the right button.

------------------------------
Cohen
Romania
------------------------------

Hi John,

It is searching for the image of the "Yes" button and high lighting that on the screen.The pop up window dialog box does not get activated and because of this reason keystrokes do not work.

Once the "Yes" button area got highlighed,I tried to send "ENTER" through global send key events but it does not work.

If somehow we can activate the pop up window,these options will work.But that's not happening as of now,the main powershell window which leads to this pop up window remains activated.The dialog box will get activated when we click on it,which is not happening as of now.

------------------------------
Consultant
Capgemini
------------------------------

Anonymous
Not applicable
have you resolved it?

------------------------------
Cohen
RPA developer
------------------------------