Search code examples
c++uwpuacmicrosoft-ui-automation

How to allow uiAccess in UWP application


I am invoking C++ UIautomation modules in my UWP application. The application is not able to extract control elements since it is not running in an elevated environment. How should I set up the manifest file or set my UWP app to be able to get access to ui elements of other applications.


Solution

  • I'd suggest that you could put the UIautomation modules into a console app and then launch the console as elevated from your UWP app using desktop bridge. You will also need to add the allowElevation capability into the manifest file.

    For detailed steps, you could take a look at Stefan wick's blog- App Elevation Samples.