Screen resolution changes while running bot in unattended mode

VJR

Well-Known Member
Hi neel,

I attached the script also which i used
Which is the script you used :)

Also did you run the ps1 file directly by making changes into it?
Or did you create a .bat file and then tried running it.
Hi neel,

There is a different syntax to be used when writing the command directly on the command prompt (eg; usage of double quotes). The suggestion I gave you was to create a .bat file with that command in it and then double click the file manually and check what happens. See if you have appropriate permissions to do so and also make sure you are giving the correct screen resolution.
Didn't hear back about any of them so its not clear how exactly are you running the script.

Also there are multiple suggestions given by @tgundhus and myself above...are you following any of them and if yes which one, so that suitable inputs can be given to you.
 

Debduti M

New Member
Hi neel,

I attached the script also which i used
Which is the script you used :)

Also did you run the ps1 file directly by making changes into it?
Or did you create a .bat file and then tried running it.

Didn't hear back about any of them so its not clear how exactly are you running the script.

Also there are multiple suggestions given by @tgundhus and myself above...are you following any of them and if yes which one, so that suitable inputs can be given to you.
Hi,

I am trying very hard to change the csreen res to 1920X1080 but the ps1 is doing all the changes except 1920. Any help please... c# code is not being accepted completely by the code stage
 
Hi neel,

While responding to another thread on the forum I came across an idea to do something like the below.
I ran this and it is working perfectly fine. I've used the script from the earlier link the one that shows under SetRes.ps1.


Refer the below Process Diagram:
View attachment 1365

Get Screen Resolution:

Note that there are 2 Output parameters for this action - Horizontal and Vertical Resolutions.
Add both of them.

View attachment 1366



Decision stage to check if the screen is already set to the correct resolution:
If it is, then nothing to do. Continue with your process.
If not, then use Start Process to change the resolution.

View attachment 1367

Start Process:
Here are the Arguments if you would like it for copy
"-NoProfile -ExecutionPolicy Bypass -File ""C:\Users\Administrator\Desktop\SetRes.ps1"" 1152 864"

You need not hard code anything in the ps1 file nor in any of the below Arguments.
Since as per Blue Prism best practices one needs to make the object reusable as much as possible, you can have separate Data Items for all the three
- ps1 file path
- Horizontal resolution
- Vertical resolution
so that the function in the ps1 file can be used to change any resolution depending upon what parameters you have passed

View attachment 1368
Will this works on windows10?
i tried the way u mentioned. But it is not working
 
Hi Neel,

Memory need to be allocated by your VM provider(infrastructure team) if you need to use different screen resolutions

Regards,
Nithin S Kumar
 
Top