How can i maximize a specific window through cmd?(windows)

走远了吗. 提交于 2020-01-11 02:16:53

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!