Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Focus issues in ConPTY sessions

Jun
149
13
First of all, a heartfelt thank you to Rex for all the work spent addressing issues. So much more has gone right with version 36 than has gone wrong. Just don't want that to get lost.

Now on to the issues:

On my machine, in a ConPTY session running in a TCMD tab, the following functions/command are not returning focus to the TCC window after the pop-up dialog which they display is closed
  • @GetDir
  • @GetFile
  • TaskDialog
They all work as expected in a ConHost session running in a TCMD tab.
They also work as expected in TCC running in a Windows Terminal ConPTY session.


On a positive note, the following functions/commands are working as expected in terms of returning focus to TCC.
  • @GetDate
  • @GetDateTime
  • @GetFolder
  • @Select
  • MSGBOX
  • QUERYBOX
  • [all Command Dialogs]
 
I don't know if this is related, but since switching to v36 and ConPTY tabs, I'm having random trouble with the TCC tabs inside TCMD getting the focus.

As in working in a TCC tab in TCMD, switching to another app, and then using Alt-Tab to select again the TCMD window. Which works, but the TCC tab does not have the focus.

I don't have recipe, because it doesn't always happen, but it does with enough frequency to be a nuissance.
 
@GetDir, @GetFile, and TASKDIALOG all return focus to TCC as expected in build 49. Thanks Rex.
 
What specifically "Not for me"?

What was written in the previous post: @GetDir, @GetFile, and TASKDIALOG all return focus to TCC as expected in build 49.

After I use GetDir or GetFile, TCC does not have focus. Also not in build 50.
 
Excellent. The focus issue appears to be fixed in build 51.

I did still have an old problem with the update. I invoked it from a TCC tab in TCMD. When TCMD and all its TCC sessions closed, the update was also terminated. This was the first time in a while that I tried doing the update from TCMD instead of from a standalone TCC session.
 
You should be doing the update from the TCMD help menu, not a TCC tab.

I'm pretty sure that I remember being told to update by running the command option /u from TCC. I have been doing that for years (using the alias "update"), and it always worked just fine until version 36. The command still works fine from a standalone TCC session.
 
I'm pretty sure that I remember being told to update by running the command option /u from TCC. I have been doing that for years (using the alias "update"), and it always worked just fine until version 36. The command still works fine from a standalone TCC session.

That might be how you were told by somebody (but not by JP Software) to update TCC in the past. But that's only valid for the stand-alone TCC (i.e., not the one bundled with Take Command).

And the updater in v36 has 0% in common with the updaters in previous versions.
 
I did still have an old problem with the update. I invoked it from a TCC tab in TCMD. When TCMD and all its TCC sessions closed, the update was also terminated. This was the first time in a while that I tried doing the update from TCMD instead of from a standalone TCC session.

When the updater runs, if you choose to update, then TCMD.EXE, TCC.EXE, and TCUPDATER.EXE will all be terminated after the installer is downloaded and begins running.

If you're saying that the installer is also terminated (not reproducible here), then I need more details on your configuration and exactly what you're doing.
 
When the updater runs, if you choose to update, then TCMD.EXE, TCC.EXE, and TCUPDATER.EXE will all be terminated after the installer is downloaded and begins running.

If you're saying that the installer is also terminated (not reproducible here), then I need more details on your configuration and exactly what you're doing.

That's exactly what I was saying (and not for the first time). It has been a problem throughout the version 36 process. I've learned to save the new tcmd.exe, close things myself, and then run the tcmd.exe file.

For years and years, I had been updating by running my alias for option /u from a tab with no problem. My suspicion is that the problem is related to the other problems people have been reporting with apps that close when TCMD is closed or apps the prevent TCMD from closing while that app is still running.
 
That's exactly what I was saying (and not for the first time). It has been a problem throughout the version 36 process. I've learned to save the new tcmd.exe, close things myself, and then run the tcmd.exe file.

Not reproducible here (or AFAIK with other users; at least nobody else has reported that). So I suspect it's a system-specific issue, which is why I've asked you to detail exactly what you're doing and how you have your TCMD configured.

My suspicion is that the problem is related to the other problems people have been reporting with apps that close when TCMD is closed or apps the prevent TCMD from closing while that app is still running.

That would not be the case here. The issues with apps closing or not closing (which I believe have all been addressed by now) are specific to TCMD.EXE. Your issue is with the installer, after TCMD.EXE has been closed.
 
I just tried OPTION /U in TCC in a TCMD tab for the first time. I used this alias: @@ctrl-u=^e@option /u. Then I EXITed TCC just before the updater would have copied the file. TCMD closed too and so did the updater.
 
That would not be the case here. The issues with apps closing or not closing (which I believe have all been addressed by now) are specific to TCMD.EXE. Your issue is with the installer, after TCMD.EXE has been closed.
Accevent from the Windows SDK still has this problem. I'm using the latest Windows 11 SDK installed with Studio 2026.
1. Launch TCMD with the default tab.
2. Run accevent from the prompt.
3. In the TCC tab from within TCMD type exit and then press enter.
4. Accevent will close along with the tab and TCMD. Note that if you do this from a second tab that only the second tab and accevent close.
 
Accevent from the Windows SDK still has this problem. I'm using the latest Windows 11 SDK installed with Studio 2026.
1. Launch TCMD with the default tab.
2. Run accevent from the prompt.
3. In the TCC tab from within TCMD type exit and then press enter.
4. Accevent will close along with the tab and TCMD. Note that if you do this from a second tab that only the second tab and accevent close.

I don't have any app named "accevent" on my system. Is "accevent" a console app or a GUI app?

If you only have one tab window open and you exit TCC, then TCMD will also exit (WAD) unless you have the option set in TCMD configuration to remain open with no tabs.
 
I just tried OPTION /U in TCC in a TCMD tab for the first time. I used this alias: @@ctrl-u=^e@option /u. Then I EXITed TCC just before the updater would have copied the file. TCMD closed too and so did the updater.

Not reproducible here.

1. Not a supported or documented way to update TCMD. Does the update work if you do it the documented way (Help / Check for updates)?
2. You exited just before the updater would copy what file? You mean "just before the updater would download the installer?
3. What version of Windows?
4. What build of TCMD?
5. Were you in an elevated or normal session?
6. Why did you exit TCC? The installer (not the updater) would have closed TCC before the install.
7. Did you have more than one tab window open? If not, did you have the remain open with no tabs option set?
 
Now it's build 52. It was

Code:
TCC 36.00.52 x64 (d:\tc36\tcc.exe)
Microsoft Windows 11 Pro for Workstations
10.0.26200.8457 (25H2)
TCMD version 36.0.51 (ConPty=Yes)

... elevated, one tab. I think it was the installer that was running (and disappeared along with TCC and TCMD). I exited TCC just before the files were copied to the install directory.

Like Jay, I've been using UPDATE /U for many years. It has always updated TCMD also (and still does). That's how I have been updating throughout the beta. Today was the first time I tried it from TCC running in TCMD.
 
I don't have any app named "accevent" on my system. Is "accevent" a console app or a GUI app?

If you only have one tab window open and you exit TCC, then TCMD will also exit (WAD) unless you have the option set in TCMD configuration to remain open with no tabs.
I realize that TCMD will exit, but accevent shouldn't be closed when it exits. It is at C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64 on my system. I'll attach it to this post.
 

Attachments

1. Not a supported or documented way to update TCMD. Does the update work if you do it the documented way (Help / Check for updates)?

I'm sorry, Rex, but that is just not true. Look at your own help file for the OPTION command.

1779158053640.webp


If that is really not supported any longer, please remove the /u switch and remove it from the help (and perhaps flag it in the "whats new", since it has been there for ages and still worked in version 35, I'm pretty sure). If it works only in a standalone TCC session, the should be a prominent note to that effect in the help, since I think it is fair for users to expect that TCC works in a TCMD tab.

For the update to build 52, I used the method you specified, and it did work perfectly.
 
... elevated, one tab. I think it was the installer that was running (and disappeared along with TCC and TCMD). I exited TCC just before the files were copied to the install directory.

The installer shows a dialog, the updater shows a messagebox. Which one are you seeing?

And why are you exiting TCC in the middle of the update / installation?

Like Jay, I've been using UPDATE /U for many years. It has always updated TCMD also (and still does). That's how I have been updating throughout the beta. Today was the first time I tried it from TCC running in TCMD.

?? There is no TCC command named "UPDATE".
 
I'm sorry, Rex, but that is just not true. Look at your own help file for the OPTION command.

View attachment 5817

If that is really not supported any longer, please remove the /u switch and remove it from the help (and perhaps flag it in the "whats new", since it has been there for ages and still worked in version 35, I'm pretty sure). If it works only in a standalone TCC session, the should be a prominent note to that effect in the help, since I think it is fair for users to expect that TCC works in a TCMD tab.

For the update to build 52, I used the method you specified, and it did work perfectly.

Yes, OPTION /U is for updating TCC , as the help says. It's not for updating TCMD. The help generally covers what a command does, not everything that it doesn't do.

Whether it "worked" in previous versions isn't really relevant, given that (1) the updater in v36 is 100% different than the one in previous versions, and (2) you're relying on undocumented / unsupported behavior, which I do not feel compelled to emulate in new versions.
 
Yesterday I was seeing the installer. I exited TCC/TCMD because I figured it couldn't copy new files while they were running. As I said, it was the first time I tried it in TCC in TCMD. For a long time I did it in TCC in WT and exited TCC before dismissing the updater.exe message box. Yesterday I waited until the installer started before exiting TCC/TCMD.
 
The installer will stop running processes if it needs to update files. There isn't any need to exit TCC in the middle of an update / install.
Is there any need not to do that? In other words, is it correct/expected behavior that exiting TCC and TCMD while the installer is running causes the installer to exit?
 
Started from TCC/TCMD with UPDATE /U, the installer couldn't stop 4 instances if TCC running in WT. It did stop TCMD (and its TCC) and itself.

Started from TCMD's Help\Check for updates, in the same situation, it stopped all TCCs and TCMD and succeeded.
 
Back
Top