Unable to detect certain Windows system UI elements when UAC is disabled via group policies

Bug reports.
ssrmm
Posts: 2
Joined: Wed Aug 31, 2022 4:37 pm

Unable to detect certain Windows system UI elements when UAC is disabled via group policies

Post by ssrmm » Wed Aug 31, 2022 6:17 pm

Hallo,

we are creating automated tests for an application that integrates into the Windows Notification Center. When doing so we noticed that on some of our machines the tests that are using the Notification Center don't work. On those machines Ranorex is not able to find any UI elements in the Windows Notification Center and some other Windows system UIs (see red marked areas in the screenshot below). The UIs in question seem to be based on the UWP, the problem however does not generalize to UWP apps . Things like the Settings app and the calculator can be tracked properly. This happens both during test execution as well as when trying to track the elements directly in Spy.

We managed to narrow down the issue to the group policy setting User Account Control: Run all administrators in Admin Approval Mode. If that setting is set to Disabled, meaning that UAC is turned off completely, then Ranorex can not find any UI Elements for those UIs. If we change the setting to Enabled, then it suddenly works. Note that UAC prompts are disabled either way, due to group policy User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode being set to Elevate without prompting.

I feel like UAC being completely disabled shouldn't cause problems like this.

We encountere this on Windows 10 21H1 and 21H2 with Ranorex 9.5.3 and latest 10.2.4.

Image

odemin
Posts: 11
Joined: Tue Jun 07, 2022 12:01 pm

Re: Unable to detect certain Windows system UI elements when UAC is disabled via group policies

Post by odemin » Mon Sep 19, 2022 12:52 pm

If you to run Ranorex as administrator command (right click -> "Run as administrator"), Is all good too?

ssrmm
Posts: 2
Joined: Wed Aug 31, 2022 4:37 pm

Re: Unable to detect certain Windows system UI elements when UAC is disabled via group policies

Post by ssrmm » Mon Sep 19, 2022 3:02 pm

No, run as administrator makes no difference.

The user is local administrator in the machine and UAC is completely disabled via policy. So I think it makes a lot of sense that "Run as administrator" doesn't change the behaviour because it is meaningless in this scenario.