Does TCC have a hand in this?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
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
10,101
85
#2
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
 
#3
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
 
#4
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.