View Single Post
  #7  
Old September 19th 18, 11:09 PM posted to alt.msdos.batch,alt.windows7.general
pyotr filipivich
external usenet poster
 
Posts: 752
Default how to get the title into task manger 'window'?

VanguardLH on Wed, 19 Sep 2018 13:40:47 -0500 typed in
alt.windows7.general the following:
pyotr filipivich wrote:

I run batch files. (well 'duh')
Sometimes I'll have two or more running, but when I look at the
task bar, all I see of the "title" is "Adminis..."

IF I hover over the mouse, up pops the popup with the full title:
e.G., "Administrator: ZZ Home Agent Bat".

Is there a way to eliminate, remove, not display the
"administrator" part, or is that a Feature?
It occurs to me,that if I could rename "administrator" to
something shorter (E.G., Adm, Me, ...) that would serve as a
"solution" of sorts.


Give the batch file a title when you run it, like:

start "title" parms your.bat

To see the syntax for the 'start' function, run 'start /?' at the
command line. 'start' is an internal function within the command
interpreter (cmd.exe). Sometimes you get "unknown command" if you just
start the command line with 'start' (because whatever is the handler
doesn't know you are entering a function from within cmd.exe). In that
case, use:

cmd /c start "title" parms your.bat
^__ or /k depending on how you want the shell to handle stdout


Oh boy.

Remember to enclose the batch file within double quotes if its path or
file name have space characters.


So, I run CommandPrompt.bat which just has cmd in it.
At the command line I then type
start "The batchfile title" zargent.bat


The window title will have a title of "batfilename - title". You
see "Administrator - batfilename" if you are running the batch file
inside the same command shell (which, in your case, was opened with
admin privs) instead of loading another shell. If you want the new
window opened by 'start' to close when the batch file ends, add 'exit'
at the end of your batch file.


I'm seeing "Administrator: Bat-file Title" as it is.

Something to try.
--
pyotr filipivich
Next month's Panel: Graft - Boon or blessing?
Ads