How to get the window title of running application with command-line? [closed]

人盡茶涼 提交于 2021-02-06 06:27:04

问题


When application run in windows form it have property called window title .
This window title appear in the tab of the application windows.

I ask help to get this window title for the application running with command-line.


回答1:


This is example how to get the windows title for running notepad.exe in command line:

tasklist /v /fo list /fi "imagename eq  notepad*"| find /i  "window title:"

OR run this line from cmd

for /f "tokens=* skip=9 delims= " %g in ('tasklist /v /fo list /fi "imagename eq  notepad*"') do @echo %g

If you like to run from batch file you will only replace %g with %%g



来源:https://stackoverflow.com/questions/52597795/how-to-get-the-window-title-of-running-application-with-command-line

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