SO is Windows 11. When I open a cmd window and then run the title command, I can see the window title changing in the window tab. But then when I run tasklist, I get N/A in window title property.
Here is the sequence of commands:
cmd.exe
title aaa
tasklist /v /fi "imagename eq cmd.exe" /fo list
cmd is run from the Windows search bar (does not matter really, I think).
result:
Image Name: cmd.exe
PID: 24088
Session Name: Console
Session#: 1
Mem Usage: 6,244 K
Status: Unknown
User Name: AzureAD\XXXXXXXX
CPU Time: 0:00:00
Window Title: N/A
Does anyone knows why this is happening?.
I have tracked down this as a potential reason for a batch file failure using the TASKKILL command: TASKKILL /F /FI "WINDOWTITLE eq aaa" /IM cmd.exe