I just want to make a simple Notepad .bat file that would maximize a specific process window. Is that possible?
Asked
Active
Viewed 5.0k times
2 Answers
20
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

Peter Mortensen
- 30,738
- 21
- 105
- 131

npocmaka
- 55,367
- 18
- 148
- 187
-
Thanks 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. – philippeback Feb 25 '20 at 11:52
-
This should have been the answer as the OP asked about maximizing any process – Anshuman Chatterjee Jul 27 '20 at 07:25
13
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.

Peter Mortensen
- 30,738
- 21
- 105
- 131

Anirudh Ramanathan
- 46,179
- 22
- 132
- 191
-
1Nice! 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"` – Hubro Apr 05 '14 at 12:34