Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

[BREAKING] "Invalid option a", due to Win11 Default Terminal Swap #792

Open
dylanh724 opened this issue Nov 23, 2021 · 6 comments
Open

[BREAKING] "Invalid option a", due to Win11 Default Terminal Swap #792

dylanh724 opened this issue Nov 23, 2021 · 6 comments

Comments

@dylanh724
Copy link

https://forum.nzbget.net/viewtopic.php?t=3910

Win11 offers to default your terminal to the fancier (and superior) Windows Terminal. This breaks NZBG completely. Easy to repro. See thread above for further details.

@ronw23
Copy link

ronw23 commented Dec 2, 2021

I believe the underlying Windows change is this: Classic Console API vs Virtual Terminal Sequences. There's logic to check the process ID against the "console" that started it that uses calls like GetrConsoleWindow that don't have a virtual terminal equivalent.

@dylanh724
Copy link
Author

Any word on this? It's a breaking bug for Win11 to those that use Windows terminal. At one point, Win11 prompts if you want to permanently switch, and there's 0 reason not to (to those that do not know about this bug) as it's superior in every way.

@zotabee
Copy link

zotabee commented Dec 18, 2021

I confirm the issue and strange behaviors at startup on Win11 computers. Didn't know it was linked to Windows Terminal (I have it on default too).

I noticed that whichever way I try to start nzbget it will fail on that parcticular computer/setup. Either by opening a .nzb file or by starting nzbget from the start menu or from a shortcut or directly the nzbget.exe file.

Note : Starting nzbget with "Run as administrator" seems to bypass these issues and launch correctly.

@dylanh724 dylanh724 changed the title "Invalid option a", due to Win11 Default Terminal Swap [BREAKING] "Invalid option a", due to Win11 Default Terminal Swap Feb 21, 2022
@dylanh724
Copy link
Author

dylanh724 commented Feb 21, 2022

Hmm, this should probably get a priority bump:

  1. This is a common, repro'd, breaking bug.
  2. Win11 is getting dominant.
  3. Win11 shoves Windows Terminal in your face (and for a good reason).
  4. Windows Terminal is superior - I want to set mine to default, but this is the only app preventing me from doing so.

CC @hugbug

@ThioJoe
Copy link

ThioJoe commented Apr 8, 2022

I've figured out a workaround that allows you to keep the new Terminal as default. Create a shortcut to nzbget.exe and put it anywhere. Right click > Properties, and in "Target" add conhost at the very left before the path and a space between them. So it looks like below. This makes it so the old windows console host will run the exe.

Then you can put the shortcut in the startup folder (go to 'Run' and type in shell:startup). Note that in the task manager's startup programs list, it will appear as "conhost.exe".

image

A note: You might have to first run the program with the old console set as the default so it can get the config set up or something, not sure, I forgot to test. Then after you get it to running you can change the default terminal back to the new one.

@zotabee
Copy link

zotabee commented Oct 22, 2022

Windows Terminal is now the Default in Windows 11

The day has finally come! Windows Terminal is now the default command line experience on Windows 11 22H2! 🎉 This means that all command line applications will now automatically open in Windows Terminal.

https://devblogs.microsoft.com/commandline/windows-terminal-is-now-the-default-in-windows-11/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants