Ranorex Agent and elevation

Best practices, code snippets for common functionality, examples, and guidelines.
HansSchl
Posts: 98
Joined: Wed Sep 19, 2018 10:05 am

Ranorex Agent and elevation

Post by HansSchl » Mon Feb 08, 2021 7:58 am

Hi,

My system runs tests on a remote machine under Ranorex Agent. Searching the cause for strange test failures, I found that the agent runs elevated, and starts the AUT elevated. This has two undesired side effects:
- When the AUT runs elevated, I cannot detect problems that come from insuficient privileges.
- Drag and drop from Windows Explorer to the AUT cannot work (you cannot d&d from non-elevated to elevated application).

Is this just a bad configuration on my side, or is it required that agent and AUT run elevated? If bad configuration, what are the relevant settings?

(Ranorex 9.3.1 under Win10)

Thank you
Hans

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6795
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Ranorex Agent and elevation

Post by odklizec » Fri Apr 16, 2021 7:30 am

Hi Hans,

I guess you probably already solved this issue, or completely forgot about it? ;) Anyway, the answer is, that remote agents requires to be run elevated. Here is more detailed explanation why...
viewtopic.php?f=4&t=11481&p=46282
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

HansSchl
Posts: 98
Joined: Wed Sep 19, 2018 10:05 am

Re: Ranorex Agent and elevation

Post by HansSchl » Fri Apr 16, 2021 7:37 am

Hi odklizec,

thanks for this message... Indeed, I solved the problem but not launching the AUT.exe, but instead "explorer.exe path\to\AUT\AUT.exe". The disadvantage is that I don't get the process ID, but currently, I don't need the ID anyway. In the future, I may dive deeper into the CreateProcess WinAPI call to find out how to launch a progress without elevation.

Cheers
Hans