Welcome!

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

SignUp Now!

A question about the "Start" command in Windows 7

May
855
0
First a quite a bit of "background" (and you can skip right to bottom of this posting if you just want to get to a (rather short) description of the actual problem and the (really short) question): I generally run under the "original" user account in Windows 7, and as you may know about Windows 7, that account has only "limited" administrative privileges (and, somewhat ironically, the "real" Administrator account exists but is both "hidden" and disabled by default (I guess Microsoft really wants to prevent people from easily having "full control" over their machines; however, instructions on how to "unhide" it and enable the true "Administrator" account are readily available on the web)). Well these "limited" privileges are not enough to do a number of things that I need to do on a regular basis, and the two most important of those are increasing the priority of the Windows "Magnify" app from the command line (I am visually impaired and really need the "Magnify" app, and it tends to really "bog down" and not update itself very often if at all when the system gets busy), and the second important thing is to run the "handle" command (originally from "SysInternals.com; now owned by and available from Microsoft.com) which displays a list of the processes that have a "handle" on a particular object, and since I have very bad memory (sadly, not at all a joke, another one of my 4 independent disabilities) and like to delete files and directories when I am done with them so I don't have to wonder what they were/what the "status" of whatever they contained is because of my bad memory, and when running in a TCMD/TCC/cmd.exe session that does not have full administrative privileges I get the message "TCC: (Sys) The process cannot access the file because it is being used by another process. file_or_directory_name", so I need to find out what process is "using" the file or (particularly) directory so I can either terminate or do something in the process to cause it to "free" the object (CDing to a different directory is most often the solution in TCC if TCC is one of the "users" of a directory). Well the "handle" command requires "full" administrative" privileges (how Microsoft imagines anyone can run it in Windows 7 is beyond me, running it from the Windows GUI is totally impractical (it creates a cmd.exe "session" to run in, runs in that session, and then terminates itself which also terminates the cmd.exe session, and all of this happens before you have any chance at all of actually seeing the output of the command), and while you can start either a TCMD, TCC, or even cmd.exe session with full administrative privileges from the GUI, I don't like the Windows GUI very much for running programs; I much prefer running these things from a command line (I find the "Start" menu somewhat hard to "navigate" with my bad eyesight, and I use a relatively large font in TCMD/TCC), so therefore when I need to do such things I "Start" TCMD with the "/ELEVATED" parameter to do the either of the above as well as possibly other things.

Now to the actual "problem":

I start a TCMD session with the "/ELEVATED" parameter when I want do anything that requires "full" administrative privileges, but doing so has a rather odd and somewhat annoying side-effect: While TCMD is, in fact, started with full administrative privileges, a totally separate TCC session is also started also with full administrator privileges, which I then have to close. Again, not a major problem, but definitely somewhat annoying.

So, finally, on to the actual question: Why do both a TCMD session and TCC session start and is there anything I can do to prevent that from happening?
 
re: A question about the "Start" command in Windows 7

I have an alias ELEVATE, defined as:
Code:
*start /elevated
if I issue this command:
Code:
elevate
then, after satisfying UAC of my credentials, I get a stand-alone TCC (not TCMD) window with administrator privileges. Alternatively, to address one of your requirements directly, if I issue:
Code:
elevate /k d:\programs\sysinternals\handle.exe
then, again after a UAC prompt, I get a stand-alone TCC in which the handle output is displayed and the window stays open for me to close manually.
 
re: A question about the "Start" command in Windows 7

Probably because you're using the wrong syntax in your START command. Please post the *exact* command line you're using.
Rex, absolutely nothing that you would not expect. Simply "Start /ELEVATED TCmd", nothing more, nothing less. And I did it again just now under version 12.11.74, and got exactly the same results (no surprise to me, of course).

However, I just tried it under 13.00.21, and it did not do that, but it did do something that I did not quite expect: I got a single TCC window rather than a TCMD window. Is this by design?

Finally, just as a note, I looked back at this thread just for the heck of it because I did not get any e-mail notifications (and I just looked again) that anybody had responded to my original posting. Don't know if it's really an issue/problem, but I thought it was worth mentioning.
 
re: A question about the "Start" command in Windows 7

> Rex, absolutely nothing that you would not expect. Simply "Start /ELEVATED
> TCmd", nothing more, nothing less. And I did it again just now under
version

> 12.11.74, and got exactly the same results (no surprise to me, of course).
>
> However, I just tried it under 13.00.21, and it did not do that, but it
did do

> something that I did not quite expect: I got a single TCC window rather
than a

> TCMD window. Is this by design?

The START command has not changed between v12 and v13.

I suspect that either you have an alias for START, or you set the "single
instance" option in the Take Command configuration dialog. If you stick a
/C or /K in the command line (or in an alias), you'll get a new TCC instance
that then starts a new TCMD instance -- which then may or may not create a
new TCMD window, depending on the single instance option.
 
re: A question about the "Start" command in Windows 7

The START command has not changed between v12 and v13.

I suspect that either you have an alias for START, or you set the "single
instance" option in the Take Command configuration dialog. If you stick a
/C or /K in the command line (or in an alias), you'll get a new TCC instance that then starts a new TCMD instance -- which then may or may not create a new TCMD window, depending on the single instance option.
Rex, this only makes it more mysterious. A. I have not ever changed any of the "options" because I am perfectly happy with things just the way they are; I have invoked the "Option" command only a couple of times just to see "options" there were. B: I have no "ini" files anywhere in any of the TCMD directories except for updater.ini's (which I sort of assume has something to do automatically getting "bug fix" updates) and .ini files for plugins. I also do not have an alias for the "start" command. And clear proof of those assertions is in the attached file that was created with the TCmd/TCC "Save to File" menu option. And what you will see when you examine that file is that A. Again, I have absolutely no .ini files at all other than "updater.ini" and .ini files in the "Plugins" directories. (And, since I don't even have any .ini files at all, I think that fact absolutely proves that I can't possibly have the "single instance" option set in the configuration dialog. (And I, of course, actually looked just to verify that fact.)) B. There's nothing even in the "C:\Users\DanTheMan\AppData\Roaming\JP Software" directory for the version of TCMD/TCC that I am running, which is shown by the "ver" command following the directory listing of for the "AppData\..." directory. (I have to admit that I wasn't even aware of that directory, and I have no idea whatsoever as to what its purpose is.) C. I have only one alias that even begins with the letter "S", and that is an alias I use for a .btm file that shows C++ program "history" data (which I'm not going to go into any further here because it has nothing whatsoever to do with the subject at hand). The "bottom line" is, of course, that absolutely none of the things you suggested in your reply are applicable.


P. S. Just as an aside, I was going to put the contents of the attached file inline in this message (in a "code" block) because it's really not all that long, but the "formatting" that this bulletin-board software did to it for whatever reason made it totally and completely unreadable so that it became effectively totally useless (and I probably wasted about two hours fooling around with it with absolutely no luck at all), again, as the "best I can do" I attached it to this missive.
 

Attachments

  • Start Command History.txt
    4.7 KB · Views: 256
re: A question about the "Start" command in Windows 7

P. S. Just as an aside, I was going to put the contents of the attached file inline in this message (in a "code" block) because it's really not all that long, but the "formatting" that this bulletin-board software did to it for whatever reason made it totally and completely unreadable so that it became effectively totally useless (and I probably wasted about two hours fooling around with it with absolutely no luck at all), again, as the "best I can do" I attached it to this missive.
Next time put it into an
HTML:
 block instead. The < and > that wrap the DIR in a directory listing get totally mangled because [CODE] strips out any HTML and the <DIR> is interpreted as such.

Here's your submission in an [HTML] block.

[html]
[Z:\]cdd "D:\Program Files\JPSoft"

[D:\Program Files\JPSoft]dir

 Volume in drive D is Data           Serial number is e4fa:ef04
 Directory of  D:\Program Files\JPSoft\*

 9/13/2011   1:59         <DIR>    .
 9/13/2011   1:59         <DIR>    ..
 2/19/2011   1:37         <DIR>    SafeChars Plugin
 1/17/2011   1:42         <DIR>    TCMD9
 3/16/2011  15:40         <DIR>    tcmd10
 1/17/2011   1:41         <DIR>    tcmd11
 9/04/2011   0:14         <DIR>    tcmd12
 9/15/2011   0:22         <DIR>    TCMD12.10Build66
 9/14/2011  12:55         <DIR>    TCMD12.11Build74
 9/04/2011   0:12         <DIR>    TCMD12.20Build73
 9/04/2011   0:11         <DIR>    TCMD12B
 9/13/2011  16:33         <DIR>    TCMD13
                 0 bytes in 0 files and 12 dirs
     6,792,626,176 bytes free

[D:\Program Files\JPSoft]dir *.ini /s /f
D:\Program Files\JPSoft\TCMD9\updater.ini
D:\Program Files\JPSoft\tcmd10\updater.ini
D:\Program Files\JPSoft\tcmd11\updater.ini
D:\Program Files\JPSoft\tcmd12\updater.ini
D:\Program Files\JPSoft\tcmd12\Plugins\holidays.ini
D:\Program Files\JPSoft\TCMD12.10Build66\updater.ini
D:\Program Files\JPSoft\TCMD12.10Build66\Plugins\holidays.ini
D:\Program Files\JPSoft\TCMD12.11Build74\updater.ini
D:\Program Files\JPSoft\TCMD12.11Build74\Plugins\holidays.ini
D:\Program Files\JPSoft\TCMD12.20Build73\updater.ini
D:\Program Files\JPSoft\TCMD12.20Build73\Plugins\holidays.ini
D:\Program Files\JPSoft\TCMD12B\updater.ini
D:\Program Files\JPSoft\TCMD12B\Plugins\holidays.ini
D:\Program Files\JPSoft\TCMD13\updater.ini

[D:\Program Files\JPSoft]cdd "C:\Users\DanTheMan\AppData\Roaming\JP Software"\

[C:\Users\DanTheMan\AppData\Roaming\JP Software]dir

 Volume in drive C is "Win7 Boot"    Serial number is 06f9:b6a4
 Directory of  C:\Users\DanTheMan\AppData\Roaming\JP Software\*

 9/13/2011   2:11         <DIR>    .
 9/13/2011   2:11         <DIR>    ..
12/28/2010  22:10         <DIR>    Take Command 12.0
 1/20/2011   3:25         <DIR>    Take Command 12.01
                 0 bytes in 0 files and 4 dirs
     4,085,538,816 bytes free

[C:\Users\DanTheMan\AppData\Roaming\JP Software]ver

TCC  12.11.74   Windows 7 [Version 6.1.7601]

[C:\Users\DanTheMan\AppData\Roaming\JP Software]alias s*
Sh*owCPPProgramHistory=D:\DOS\ShowCppProgramHistory.btm

[C:\Users\DanTheMan\AppData\Roaming\JP Software]
 
re: A question about the "Start" command in Windows 7

Type:

which start
which tcmd

At the command line and tell me what they return.

A "start /elevated tcmd" will never work anywhere except in the installation
direction, unless you've added the TCMD installation directory to your PATH.
 
re: A question about the "Start" command in Windows 7

Type:

which start
which tcmd

At the command line and tell me what they return.

A "start /elevated tcmd" will never work anywhere except in the installation direction, unless you've added the TCMD installation directory to your PATH.
Rex, you've probably "hit the nail right on the head", but not quite in the way you might have expected, and you will probably have to give me more details as to what the "right" thing to do is even if the "right" thing to do is doing nothing.. You see, I don't actually have the directory containing the installed version of TCMD/TCC in my path, but I do have effectively the same thing: ALL of my DOS commands are in one single directory, and this includes DOS commands I got from other sources on the web, the quite a few DOS commands that I wrote myself mostly inc C++, and ALL of the TCMD/TCC executables and those .BTM files supplied by you that I find useful, but they are hard-linked there from the JPSoft "installation" directory that contains them. I did this because I didn't want to add that directory to my path, my path is already almost unmanageably long, particularly given my bad eyesight, and what you say above would kind of seem to indicate that I shouldn't have done that, which I must admit kind of surprises me. (This stuff doesn't have to be in the path????) So anyway, to directly answer your question(s), "Which start" returns "Start is an internal command", and "Which TCMD" yields "TC*MD is an alias : D:\DOS\tcmd.exe TCStart.btm". So please tell me what I need change here. Thank you!

P. S. Just to illustrate the "unmanagably long", my complete path is:

Z:\;C:\Windows\System32;C:\Windows;D:\SysInternals;D:\DOS;C:\Windows;System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Windows\System32\wbem;C:\Program Files\QuickTime\QTSystem;D:\Program Files - Junctioned to C Drive\Regular Expression Component Library Vc8\Dll;D:\Program Files\Prio
 
re: A question about the "Start" command in Windows 7

"Which TCMD" yields "TC*MD is an alias : D:\DOS\tcmd.exe TCStart.btm". So please tell me what I need change here. Thank you!

That's your problem -- you do *not* want to be passing TCSTART as an argument to TCMD. TCMD cannot execute TCSTART, so it has to start another TCC session to execute it. (Pointlessly, since starting TCC will always execute TCSTART anyway.)
 
re: A question about the "Start" command in Windows 7

That's your problem -- you do *not* want to be passing TCSTART as an argument to TCMD. TCMD cannot execute TCSTART, so it has to start another TCC session to execute it. (Pointlessly, since starting TCC will always execute TCSTART anyway.)
Rex, thank you for your quick response, but it really misses the point of the question because I was not using that alias anyway in the situation(s) I was asking about (I wanted to start TCMD in "ELEVATED" mode), and I changed the alias (to "TC*MD=D:\DOS\TCMD.exe"), and executing the command "Start /Elevated TCMD" (which, again as far as I know, wasn't using that alias anyway) still brings up a both a TCC session and a TCMD session! (And, in another bit of real oddness, I no longer know how to even test which one or both of the TCMD and TCC sessions are, in fact, "elevated"! You see, I was "elevating" because the "PsKill" command (originally from "SysInternals.com", now a part of Microsoft) required full administrative privileges to run and actually "kill" a process (it used to output a message to that effect), and it is now doing that no longer!!!! I don't have a clue as to what in my system has changed here.) I no longer even know how to check out which (if not both) of the TCMD and TCC sessions are, in fact, elevated!!! On one hand, I tend to guess that I don't have to use "/Elevated" any more at all, but on the other hand, again, I no longer know of a way to even test whether a given TCMD/TCC session is, in fact, "elevated", which, of course, makes the whole subject totally irrelevant! Such is life...

Quick Update! I figured it out! You see, I had forgotten (bad memory again, which sadly is not a joke) that I had downloaded the latest version(s) of those utilities from Microsoft in the past month or so, and it would appear (and I would not have known this because I always ran "PsKill" in an "elevated" TCC session) that they no longer require the command session from which they are run to be "elevated"! (I have to admit, as an aside, that I didn't even know that bypassing asking the user if he wants to actually run "xxx" "elevated" was even possible - and not only that, but I tend to think that the fact that this can be done somewhat dangerous - particularly when it comes to programs that are actually "malware". More new (but possibly useless) information...)
 
re: A question about the "Start" command in Windows 7

Next time put it into an HTML block instead. The greater than and less than signs that wrap the DIR in a directory listing get totally mangled because the CODE directive strips out any HTML and they are interpreted as such.
Thank you very much John, (assuming that is really your name! ; > ) > That's really good to know! But how did you manage to put those tags in your response without them being interpreted as "tags" by this bulletin board? (My inability to accomplish that is why I took them out/replaced them by words in this response.)
<dir><dir><dir><dir><dir><dir><dir><dir><dir><dir><dir><dir><dir><dir><dir><dir>
</dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir>
 
re: A question about the "Start" command in Windows 7

But how did you manage to put those tags in your response without them being interpreted as "tags" by this bulletin board?
Using the magic of HTML character codes.

HTML:
 = &amp;#91;HTML&amp;#93;
[CODE] = &amp;#91;CODE&amp;#93;
&lt;DIR&gt; = &amp;lt;DIR&amp;gt;

And as the coup de grâce, the code representing the above code which I had to double, err, triple code to get it to show right.

&amp;#91;HTML&amp;#93; = &amp;amp;#91;HTML&amp;amp;#93;
&amp;#91;CODE&amp;#93; = &amp;amp;#91;CODE&amp;amp;#93;
&amp;lt;DIR&amp;gt; = &amp;amp;lt;DIR&amp;amp;gt;
 
re: A question about the "Start" command in Windows 7

A message about HTML codes...
Thank you for taking the (possibly considerable?) time to do what you did to show me that, and I am impressed! However, given my bad memory, there's no way that I would actually "remember" how to do that, but I am "archiving" it on my computer just in the (rather unfortunate for me) case that I have to actually do it myself.

By the way, I had to "replace" your reply with the italicized message above because it did not "survive" the "reply/
" process.
 

Similar threads

Back
Top