WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: fhammer on April 01, 2019, 11:01:36 AM

Title: Run program in non-zoomed state
Post by: fhammer on April 01, 2019, 11:01:36 AM
When I use a Run command to run a program (e.g. "chrome.exe"), it sometimes starts in a zoomed state, even though I specify @NORMAL in the run command.
It appears that specifying @NORMAL (with either the Run or RunShell functions), starts the program in same window state as was previously run.

I can temporarily change the behavior by:
  - Manually starting the program,
  - "restore down"
  - Exit the program (via the program's Exit feature, rather than the window's "X")

Is there a way to run a program such that the associated window is "normal and not zoomed"?

Thanks.
Title: Re: Run program in non-zoomed state
Post by: td on April 01, 2019, 01:12:18 PM
The simplest explanation to the first part of your post is that "it's just the way Windows works."  As for your question, see the response to your previous question.
Title: Re: Run program in non-zoomed state
Post by: jmburton2001 on April 02, 2019, 08:09:50 AM
Quote from: fhammer on April 01, 2019, 11:01:36 AM
When I use a Run command to run a program (e.g. "chrome.exe"), it sometimes starts in a zoomed state, even though I specify @NORMAL in the run command.

Is there a way to run a program such that the associated window is "normal and not zoomed"?


I ran into that issue running Chrome within a script. I solved my Chrome window size and position using Chrome's command line switches (https://www.google.com/search?q=chrome+command+line+options&oq=chrome+command+line&aqs=chrome.2.69i57j69i60j0l4.14399j0j4&sourceid=chrome&ie=UTF-8) rather than trying to control the window with Winbatch.

Just my two cents... YMMV!
Title: Re: Run program in non-zoomed state
Post by: td on April 02, 2019, 08:42:17 AM
The OP mentioned Chrome as an example but he also mentioned that he was starting multiple applications without necessarily knowing what they might be in advance and what works for Chrome is not likely to work for other applications.