2

I wanna set the screen resolution of screen 1 to a predetermined value of 1872 x 1248 then set scaling to 100% then launch a .exe file from a folder, and once the exe is closed revert the screen automatically back to 3240 x 2160 and 200% scaling.

EDIT1:

Batch command to change the resolution of a computer

this one helped me set the resolution and it works fine:

  ChangeScreenResolution.exe /w=1872 /h=1248 /d=0

allFiles.exe

/wait allFiles.exe 
ChangeScreenResolution.exe /w=3240 /h=2160 /d=0 

But I couldn't find any resources on how to set resolution scaling at all, that's the missing bit, I'm fairly sure it can be done, but I don't know how.

How can it be done?

Thanks

17
  • We are not here to help you with 'googling' problems! This site helps you with a specific issue with a submitted minimal reproducible example of your code. Please make sure that you visit the linked pages of How to Ask to better understand how things work on StackOverflow, then edit your question to include, that code properly formatted, and sufficient information for us to replicate that issue. Commented Jan 8, 2022 at 0:00
  • I figured out how to change the resolution and automatically back once the program is closed, but I can't find any resources on display sclaing, how can it be done? Commented Jan 8, 2022 at 0:00
  • We do not provide those resources for you, we are not your interactive search engine, performing your research for you, then linking you to the results. Commented Jan 8, 2022 at 0:02
  • Edited it with my findings and solution so far, thanks for the answer! Commented Jan 8, 2022 at 0:07
  • We expect you to ask one specific question about a single specific and reproducible issue with your submitted code. We are not here to bolt on the parts you've not researched and coded yourself. Please, before you make any more comments or changes, revisit the tour, then read and understand the How to Ask pages, I've already advised. Commented Jan 8, 2022 at 0:11

1 Answer 1

5

So thanks to @Compo I figured out how it can be done:

https://github.com/imniko/SetDPI

https://tools.taubenkorb.at/change-screen-resolution/

And these 2 can do the trick for anyone interested:

::This bit changes Screen Resolution of Display1 to 1872 x 1248
::ChangeScreenResolution.exe [/w=1872 Horizontal Pixels] [/h=1248 Vertical Pixels] [/d=0 Means Display1]
ChangeScreenResolution.exe /w=1872 /h=1248 /d=0


::This bit changes this bit changes the scaling for Display1 to 125% 
:: SetDPI.exe [Display Number 1 - means Display1] [Scaling %]
SetDPI.exe 1 125

::This bit starts allFiles.exe and goes on to the next line ONLY AFTER IT'S CLOSED
allFiles.exe /wait 

::This bit sets resolution back to original
::ChangeScreenResolution.exe [/w=3240 Horizontal Pixels] [/h=2160 Vertical Pixels] [/d=0 Means Display1]
ChangeScreenResolution.exe /w=3240 /h=2160 /d=0 

::This bit sets scaling back to original
:: SetDPI.exe /[Display Number 1 - means Display1] /[Scaling %]
SetDPI.exe 1 200

Thanks guys, it works like a charm now!

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.