Forum Discussion

DanH's avatar
DanH
Contributor
5 years ago
Solved

Problem with UAC prompt when running from Azure Pipeline

Hello,

 

I'm having a bit of a problem getting the application I want to test to install automatically.

 

The application is a Winforms desktop application with and installer.exe.

 

When run normally (e.g. if I'm just installing it on my machine) the installer throws up the UAC prompt, I enter the details and it installs.

I have written a TextComplete test which runs the installer:  this works fine if I run it and add appropriate details to the UAC prompt.  I can get it to run without showing the UAC prompt on our test agent machine by changing the properties of the TestExecute.exe to 'Run this program as an administrator' (on the Compatibility tab), and then running the installer test from Test Execute directly on the test agent machine.

However, I need to run this test from an Azure Pipeline:  when I try this I get the error:  Unable to connect to TestExecute: Failed to start TestExecute and connect to it:  The requested operation requires elevation.

 

I've checked an earlier question:  Problem-with-remote-testing-using-MS-Test-Agent, but this didn't seem to quite fit this scenario.

 

 I could, of course, turn off UAC on the test agent, but that doesn't sound like the best solution.

 

Thanks in advance

Dan

 

 

 

 

 

 

 

  • Perhaps, you could provide elevated permissions to the user/agent/admin that would run TestExecute via the Azure DevOps pipeline. Within the security tab

    , you have the option to grant permissions to whomever.

    That is, if you dont want to disable UAC on that remote machine...

3 Replies

  • Perhaps, you could provide elevated permissions to the user/agent/admin that would run TestExecute via the Azure DevOps pipeline. Within the security tab

    , you have the option to grant permissions to whomever.

    That is, if you dont want to disable UAC on that remote machine...

    • DanH's avatar
      DanH
      Contributor

      Hi there,

      Thanks for the suggestion. I have just tried making the changes you suggested, and got the same error. 

      I'll have to come back to it tomorrow.

       

      Thanks again

       

      Dan

    • DanH's avatar
      DanH
      Contributor

      Hi there...  I reckoned it was simpler to turn off the UAC prompts in the end.  The worst that can happen is that an isolated virtual machine might get a bit messed up.