Does TCC have a hand in this?

May 20, 2008
11,285
95
Syracuse, NY, USA
I posted the article below in the PowerPro forum ... no replies yet. But I have to wonder if TCC has any part in this (I doubt it) and whether the few PowerPro users in this audience might have any idea what's going on.

Below is my post to the PowerPro forum.

I have a PowerPro button:

Command: d:\tcmd9\tcc.exe
Start: Hidden
Parameters: /c start %@regquery["HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\ProjectMRUList\File1"]

TCC.EXE is the second-latest version of what was the 4NT command interpreter. My PowerPro button effectively starts Microsoft's DevEnv with my last project active.

But if there's already an instance of d:\tcmd9\tcc.exe running, and I click the PowerPro button, the running instance becomes hidden (and the desired task gets gone, so I suspect PowerPro is also starting a new, hidden, instance).

Even stranger, if an instance of d:\tcmd10\tcc.exe, a newer version, is running, the same thing happens.

I don't think TCC.EXE does any DDE (i.e., you can't give a command to an already running instance). So what's happening? Is PowerPro doing exactly what I said (starting a new instance) and, in the process, hiding every instance of any TCC.EXE it can find?

In any event, how can I stop that?
 

rconn

Administrator
Staff member
May 14, 2008
12,312
147
vefatica wrote:

> I posted the article below in the PowerPro forum ... no replies yet. But I have to wonder if TCC has any part in this (I doubt it) and whether the few PowerPro users in this audience might have any idea what's going on.
>
> Below is my post to the PowerPro forum.
>
> I have a PowerPro button:
>
> Command: d:\tcmd9\tcc.exe
> Start: Hidden
> Parameters: /c start %@regquery["HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\ProjectMRUList\File1"]
>
> TCC.EXE is the second-latest version of what was the 4NT command interpreter. My PowerPro button effectively starts Microsoft's DevEnv with my last project active.
>
> But if there's already an instance of d:\tcmd9\tcc.exe running, and I click the PowerPro button, the running instance becomes hidden (and the desired task gets gone, so I suspect PowerPro is also starting a new, hidden, instance).
>
> Even stranger, if an instance of d:\tcmd10\tcc.exe, a newer version, is running, the same thing happens.
>
> I don't think TCC.EXE does any DDE (i.e., you can't give a command to an already running instance). So what's happening? Is PowerPro doing exactly what I said (starting a new instance) and, in the process, hiding every instance of any TCC.EXE it can find?
>
> In any event, how can I stop that?

TCC does no DDE -- which doesn't work in a console app, nor does it
check for previous instances. (TCMD does both.)

Rex Conn
JP Software
 
May 20, 2008
11,285
95
Syracuse, NY, USA
On Fri, 27 Feb 2009 19:25:35 -0600, rconn <> wrote:

|TCC does no DDE -- which doesn't work in a console app, nor does it
|check for previous instances. (TCMD does both.)

I was pretty sure of that. And I told PowerPro not to try to use an existing
instance. More testing shows PowerPro does as I said, starts a new hidden
instanc (which does the correct thing). So the fault must be that it hides
every instance of TCC.EXE it can find.

--
- Vince
 
May 20, 2008
11,285
95
Syracuse, NY, USA
Further dialog (Bruce Switzer, author of PowerPro, then me):

> If you are not using "switch-to-if-active", then I believe that all
> PowerPro is doing is using the Windows system routine "ShellExecuteEx"
> to run the command line; the hidden parameter is just passed onto this
> routine which has an equivalent flag.
>
> So as best I can tell what you are seeing is some kind of interaction
> between the Windows system and tcc (which can sense other instances
> and take action based on this as part of startup).
>
> I am not sure what you are using tcc rather than just running the dev
> environment or using Windows start command, but all I can suggest is
> either starting a different way or using a PowerPro script to sense if
> a tcc instance is running and then doing something different to start.
>

I'm using TCC to dig out the last-used project from the registry (via
TCC's @REGQUERY[] variable function) so DevEnv will automatically
start with that project open. DevEnv itself, and the windows START
command can't do that.

I'm not using "switch to ...".

I tried ShellExecuteEx() in a variety of ways in my own app and could
not reproduce this behavior.

Here's one anyone can try: when I changed the PowerPro button to use
CMD.EXE to open an explorer window:

Command: c:\windows\system32\cmd.exe
Start: Hidden
Parameters: /c start c:\

I observed the same problem ... the hidden instance is created (does
its job, exits) and an already-running instance of CMD is also hidden.
 
Similar threads
Thread starter Title Forum Replies Date
fishman@panix.com First TCC instantiation after reboot does not work. Support 17
A Tcc does not recognize "bcdedit" Support 20
D Does TCC improve CMD's implementation of ECHO? Support 6
twaterloo does tcc have a task sceduler Support 4
James Miller tcc shell window does not disappear Support 18
vefatica Does TCC know I'm visiting the forums? Support 76
MickeyF Why does my tcstart.btm sometimes terminate tcc.exe? Support 4
N TCC v12.10 COPY /F does not work Support 10
deleyd How does TCC search for a command? Support 2
BobK New to TCC, Why does it use my old 4NT files? Support 3
L TCC/TCMD 11 Build 38 does no longer work ... Support 11
J How does tcc search for perl*.dll Support 1
B TCC finds perl510.dll - does NOT like it ;) Support 2
J Take command does not start on Windows 10 Support 3
J ffind does not find files Support 4
Joe Caverly PAUSE does not erase countdown timer Support 0
D ParentDirectory does not update directory history Support 6
D Documentation Help "Startup" page does not describe global lists Support 0
Charles Dye Does HASH's /E option do anything? Support 1
D Fixed @VERSION does not increment pre-fixed version numbers. Support 1
vefatica Why does @WSLPATH double the leading '/'? Support 7
D What does the file "..\Everything\Run history.csv" store? Support 5
Peter Murschall WAD rem does not work correctly Support 8
vefatica Does @SYMLINK work? Support 6
R Tree on FAT32 does not sort by name by default. Support 6
MickeyF Why does this batch file give me 'unknown command "else"' error? Support 17
M Ctrl-C when using command line history does nothing Support 2
vefatica JOBS /K ... how does it work? Support 5
Joe Caverly Why does TCCRT return VIEW as an internal command? Support 6
vefatica Find Files/Text dialog: does it work? Support 0
Alpengreis [v22.00.41] sync command flag "/X" does not work Support 22
Joe Caverly .PS1 script does not work with PSHELL Support 11
M MOVE does not behaves like intended (on failure) Support 1
R Fixed Sendmail parameter /USER= does not work Support 4
Brian Woodward How to? Does FTP.CFG only support SSL over port 21? (Newbie) Support 6
M Activation Key does not correspond… Support 2
D Lua does not work on the commandline Support 5
D Fresh instance of TCMD does not use TCMD.INI Support 7
D Fixed @Lua does not behave as documented Support 8
D everything /o does not open the option dialog Support 4
M Why does HELP keep opening in the background? Support 0
vefatica Why does my forum theme keep changing? Support 1
fishman@panix.com 19.02.37 Does Not Install For Me Support 2
I Windows 10 console does not allow alt-F4 alias to complete Support 1
fromano WAD ver /r does not detect Win 10B10166 Support 5
Alpengreis Fixed BATCOMP /O does not work Support 1
D Fixed Cut and paste in TC's file/folder view does not remove file Support 17
E View (internal command) does nothing now Support 3
D How does Cut work? Support 8
B How to? why does my BTM stop Support 2

Similar threads