cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Screen resolution

KalpeshGujrati
Level 4
Hi,

Is it possible to change the screen resolution.

------------------------------
Kalpesh Gujrati
Consultant
EY India
Asia/Kolkata
------------------------------
1 BEST ANSWER

Helpful Answers

jessiebrooks
Level 4

I had this same question.  None of the Methods I found on this thread helped. However There is a VBO in the Digital Exchange that is an update for the Environment Utility object.  There was an existing object page for getting a screen resolution. Now there is one for setting the screen resolution.   Having that update mentioned on this thread would have saved me time.  So I'm paying it forward for anyone else who might be curious.  

View answer in original post

5 REPLIES 5

AmiBarrett
Level 12

You can execute a Powershell file from a batch file, but it needs to be run as Admin. To do this, you'll need to set it as a scheduled task in Windows.

https://docs.microsoft.com/en-us/powershell/module/servercore/set-displayresolution?view=win10-ps

Edit: Be aware that if you're using this on a VM without a physical display attached, it can only get up to 1280x800 when you're not connected to the system via RDP.


------------------------------
Ami Barrett
Lead RPA Software Developer
Solai & Cameron
America/Chicago
------------------------------

Hi Ami,

Thanks for the suggestion. 🙂

------------------------------
Kalpesh Gujrati
Consultant
EY India
Asia/Kolkata
------------------------------

I am not 100% sure of the reasons for the change in screen resolution, whether it is for a specific application interaction and only temporary (you need to keep switching) or for all Runtime Resources (Robots) to have a set resolution and just to confirm that at the start of a process execution. If it is the latter then I have seen other clients have scripts that execute on Runtime Resource (Robot) startup that will make sure the device meets a specific desired state and if not sets certain things e.g. screen resolution is correct, drives are mapped if needed, Font Smoothing is set if using Surface Automation etc.

------------------------------
James Marsh
Technical Consultant
Blue Prism
Europe/London
------------------------------

Walter.Koller
Level 11
Some background info about what my activities to change desktop resolution, maybe it helps someone as this topic is of common interest.

I tried to solve change of desktop resolution following these guides:
https://www.codeguru.com/columns/vb/using-visual-basic-to-change-screen-and-desktop-settings.html
https://social.msdn.microsoft.com/Forums/vstudio/en-US/6318a324-99ff-4368-87be-423ee96a8399/chaning-screen-resolutions-from-vbnet-application?forum=vbgeneral
http://pinvoke.net/default.aspx/user32/ChangeDisplaySettingsEx.html
... and a dozen further documents.

My code works without problems but it just dont do anything for unknown reasons.

Unfortunately the ​Powershell modul Set-Displayresolution is only available with Server Core and not with eg Windows 10.
I am now trying this: https://devblogs.microsoft.com/scripting/hey-scripting-guy-how-can-i-change-my-desktop-monitor-resolution-via-windows-powershell/


------------------------------
Walter Koller
Solution Manager
Erste Group IT International GmbH
Europe/Vienna
------------------------------

jessiebrooks
Level 4

I had this same question.  None of the Methods I found on this thread helped. However There is a VBO in the Digital Exchange that is an update for the Environment Utility object.  There was an existing object page for getting a screen resolution. Now there is one for setting the screen resolution.   Having that update mentioned on this thread would have saved me time.  So I'm paying it forward for anyone else who might be curious.