Replies: 5 comments 1 reply
-
Honestly, I'm not sure -- we'll need to think about this one for a little bit. What do you plan to do with this info? :) |
Beta Was this translation helpful? Give feedback.
-
It's one of those "Am I running in Windows Terminal?" things. MY OpenConsole.exe having WindowsTeminal as parent would be a good indicator. I also noticed that |
Beta Was this translation helpful? Give feedback.
-
You can determine which shell running on which OpenConsole.exe $groups = Get-Process | Where-Object { $_.Parent.ProcessName -eq 'WindowsTerminal' }
| Group-Object { $_.StartTime.ToString() }
foreach ($group in $groups) { $group.Group; ''} |
Beta Was this translation helpful? Give feedback.
-
I want my shell to get the ProcessId of the OpenConsole.exe in which it's running. I can use C/C++ and the WIn32 API. |
Beta Was this translation helpful? Give feedback.
-
Is there any more on this? |
Beta Was this translation helpful? Give feedback.
-
I think (could be wrong) that GetWindowThreadProcessId, used on the PseudoConsoleWindow class window, used to get the PID of OpenConsole.exe. In any event, that doesn't seem to be true now; it provides the PID of the shell process.
Is there a way to determine the PID of the OpenConsole.exe which the shell is using?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions