问题
I just wanna make a simple notepad .bat file that would maximize a specific process window. Is that possible?
回答1:
Start takes an argument to do that.
START /MAX notepad.exe
However, if it an already running instance, it is outside cmd's control.
回答2:
If you want to maximize 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
来源:https://stackoverflow.com/questions/14760518/how-can-i-maximize-a-specific-window-through-cmdwindows