How to run UI application using actions on windows self hosted runner

833 views Asked by At

I have self-hosted windows runner where I'm running the workflow to start the notepad. GitHub connection is started as service in windows runner. When I execute the workflow unable to see notepad UI in desktop but can see that process in task manager. While making the GitHub connection by running run.cmd and starting the same workflow I can see notepad UI on desktop.

Hit & try till now in GH service:

  • changed the service Logon account as current user. still it fails to launch UI
  • Tried by giving the local system account as well allowed desktop interaction in service

Is there any way to launch the UI application if GH connection is activated via service ?

1

There are 1 answers

1
Lex Li On

Impossible if the runner is running as Windows service, because Windows session isolation is there since Windows Vista,

https://techcommunity.microsoft.com/t5/ask-the-performance-team/application-compatibility-session-0-isolation/ba-p/372361

But UI test cases can run in session 0, while none of the windows/dialogs are visible to you, as long as the automation framework performs the right clicks.

So if you want to see the actual UI elements, the runner must run in the current user session, not session 0.