How can I maximize a specific window through cmd? (Windows)
41,514
Solution 1
If you want to maximize an already-running program/window you can try with windowMode.bat using its title (or a string that the title starts with):
@echo off
call windowMode -title "Notepad" -mode maximized
Or with its process id:
@echo off
call windowMode -pid 1313 -mode maximized
Solution 2
Start
takes an argument to do that.
START /MAX notepad.exe
However, if it is an already-running instance, it is outside of cmd's control.
Author by
Bruno Charters
Updated on June 06, 2020Comments
-
Bruno Charters almost 4 years
I just want to make a simple Notepad .bat file that would maximize a specific process window. Is that possible?
-
Hubro about 10 yearsNice! I needed a BAT script to start a process (a shell) in a maximized CMD. This did the trick:
START /MAX cmd.exe /C "mode con cols=500 lines=500 && bin/my_shell.exe"
-
philippeback about 4 yearsThanks for this, saves the day when IntelliJ stays in a minimized state with no way to get it to behave like it should. Cool idea to have a batch with code and invoking csc on it to do advanced magic.
-
Anshuman Chatterjee almost 4 yearsThis should have been the answer as the OP asked about maximizing any process