'How do you set the screen resolution for a UiPath robot?

Every time my robot runs it captures the screen at 800x600 resolution. The system is capable of 1920x1080. How do I configure my UiPath robot to run at 1080p or even 4K screen resolution?



Solution 1:[1]

I can think of three ways to set screen resolution for a UiPath robot.

  1. In the C:\ProgramData\UiPath\UiPath.settings file
  2. On the settings tab of your robot in UiPath Orchestrator
  3. Potentially by sending the CTRL+SPACE+X hotkey to your program

UiPath.settings

In the UiPath.settings file, these are the defaults:

  "ResolutionWidth": 0,
  "ResolutionHeight": 0,
  "ResolutionDepth": 0,

A value of zero tells the robot to just use the screen resolution of the workstation. This can often default to 800x600, especially when running UiPath robots on virtual machines. Set the ResolutionWidth to 1920 and the ResolutionHeight 1080 and you'll be running your UiPath robots in high definition in no time.

UiPath Orchestrator

If you would like to override the value set in UiPath.properties, you can log onto the UiPath Orchestrator console, choose to edit your robot, and select the Settings tab. From this window you'll see a number of toggle switches, two of which allow you to set the robot's screen resolution if you toggle them on.

Send a HotKey

If the problem is a screen not running maximized, you can add a UiPath hotkey activity to your application. Invoke the CTRL+SPACE+X hotkey and the screen of the program you are using will maximize. This is less about the robot though and more about the actual process you have put in place.

UiPath Robot Resolution Example

Here's a cute little animated GIF showing you all three options that allow you to change the UiPath screen resolution.

enter image description here

Solution 2:[2]

I normally use MOVEWINDOW activity (google it) to adjust the screen size. But if the orchestator admins do not have that allowed, then you might be stuck. Also, if the admins default the normal open to full screen, a MOVEWINDOW may not be able to size it down to some other size. The fix for that is to precede MOVEWINDOW with a WIN+upArrow, wait 1 second, then a WIN+downArrow, then wait 1 second. Then MOVEWINDOW. That somehow forces the window sizing to start working.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2