Uncap does not detach properly from the console
It seems that uncap does not detach from the console but rather minimizes it and hides the window. This works fine on a default install using the "Windows Console Host" (built-in).
This however breaks in the new and much improved Windows Terminal[1]. In the settings of Windows Terminal in "Startup" you can change "Default Terminal Application" from "Windows Console Host" to "Windows Terminal". It is easy to reproduce by simply swapping this setting.
When using the WIndows Terminal then uncap simply minimizes the window. This means that is still remains visible in the taskbar. It is clearly not being detached as you can Ctrl-C out of the process. And if the window is closed it will terminate uncap.
This becomes even more annoying as the Window Terminal support tabs. If you start uncap then the full window minimizes with all your active tabs. It does not help using cmd /c uncap as this is determined by the terminal.
Workaround: Keep "Windows Console Host" as "Default Terminal Application".
This might not be a huge issue but I would expect uncap to detach properly[2][3][4][5] as I happens with common Unix utilities. If I understand the code corretly we are currently cheating by using ShowWindow(h, SW_HIDE);
This was observed on Microsoft Windows [Version 10.0.19045.5011] using Windows Terminal 1.21.2911.0
[1] https://github.com/microsoft/terminal [2] https://learn.microsoft.com/en-us/windows/console/freeconsole [3] https://stackoverflow.com/a/47833689/3703638 [4] https://stackoverflow.com/questions/13168298/have-a-user-close-a-process-allocated-console-without-exiting-the-process [5] https://stackoverflow.com/questions/432832/what-is-the-different-between-api-functions-allocconsole-and-attachconsole-1
Starting using "start" shows the weakness as well but at least avoid hiding the current window:
c:\>start uncap
This starts a new window with uncap running in the foreground.
https://www.elevenforum.com/t/change-default-terminal-application-in-windows-11.3410/ FYI steps for,
Workaround: Keep "Windows Console Host" as "Default Terminal Application".
i dont mind the workaround, but curious if there's any drawbacks i should be aware of in other applications.
If you use a shortcut, set the target to conhost.exe cmd.exe /c uncap.exe, which on my box expanded to C:\Windows\System32\conhost.exe cmd.exe /c C:\Windows\uncap.exe when I saved it.