How to run a ranorex script on a headless windows pc

Ask general questions here.
kevresult
Posts: 2
Joined: Mon Jul 14, 2014 10:57 am

How to run a ranorex script on a headless windows pc

Post by kevresult » Mon Jul 14, 2014 10:59 am

Hi All

Is it possible to run a ranorex session on a headless windows PC or does there need to be a physical monitor attached.

thanks

Kevin

Tnimni
Posts: 49
Joined: Thu Jan 02, 2014 4:03 pm

Re: How to run a ranorex script on a headless windows pc

Post by Tnimni » Mon Jul 14, 2014 2:35 pm

You can run on a "headless" PC, however keep in mind that if you are doing GUI automation you need to have the GUI open and active.

for example you'll have to RDP to that computer and keep the RDP connection open (And not minimized) for the
automation to run.

if you wish to minimize the RDP window you'll have to do the following
Navigate to one of the following Registry keys, depending on whether you wish to modify the Remote Desktop settings only for the current user or for all users on the computer:

HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client

HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client

Create a DWORD value named RemoteDesktop_SuppressWhenMinimized and set it to 2.

Close the Registry Editor.
I'm running all my atuomation on remote server, in order to avoid those issues i did the following

1. I enabled the registry keyword as described above
2. I connect via 2 server, i.e. i connect from my machine to Server A, than from server A i connect to the automation Server
3. I start the automation test run
4. Now you can close the window to server A without logging out, this will keep the connection to automation server open and the tests can run

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How to run a ranorex script on a headless windows pc

Post by krstcs » Mon Jul 14, 2014 6:13 pm

What Tnimni said is spot on.

I would only add that you have to have some form of realized desktop, not just the SUT GUI. This means, as said, RDP, VMWare console, VBox head, xVNC/VNC, etc.

In some way, shape or form, there must be a desktop on the automation system.

It cannot be locked either or you will get black screens on screenshots and failures because Ranorex can't get the objects from Windows.

For technical info, this is a Windows security feature (yes it is a feature, not a bug, and it is a good feature for security :D ) and there is nothing Ranorex can do to get around it. Windows does not allow any software but the OS to have access to the locked screen or logged-off system without going through a desktop session (RDP, local host keyboard/mouse console, etc.).
Shortcuts usually aren't...

kevresult
Posts: 2
Joined: Mon Jul 14, 2014 10:57 am

Re: How to run a ranorex script on a headless windows pc

Post by kevresult » Tue Jul 15, 2014 10:34 am

Thanks for all the replies.

We will try out the Registry settings
and see how that goes.

thanks

Kevin