问题
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