如何通过cmd最大化特定窗口?(windows)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14760518/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can i maximize a specific window through cmd?(windows)
提问by Bruno Charters
I just wanna make a simple notepad .bat file that would maximize a specific process window. Is that possible?
我只想制作一个简单的记事本 .bat 文件,可以最大化特定的进程窗口。那可能吗?
回答by Anirudh Ramanathan
回答by npocmaka
If you want to maximize already running program/window you can try with windowMode.batusing its title (or a string that the title starts with)
如果您想最大化已经运行的程序/窗口,您可以尝试使用windowMode.bat使用其标题(或标题开头的字符串)
@echo off
call windowMode -title "Notepad" -mode maximized
or with its process id:
或使用其进程 ID:
@echo off
call windowMode -pid 1313 -mode maximized