How can I maximize a specific window through cmd? (Windows)

前端 未结 2 1519
不知归路
不知归路 2020-12-16 20:36

I just want to make a simple Notepad .bat file that would maximize a specific process window. Is that possible?

相关标签:
2条回答
  • 2020-12-16 21:12

    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
    
    0 讨论(0)
  • 2020-12-16 21:14

    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.

    0 讨论(0)
提交回复
热议问题