View Single Post
  #40  
Old October 6th 18, 06:57 PM posted to alt.msdos.batch,alt.windows7.general
pyotr filipivich
external usenet poster
 
Posts: 752
Default SetTitle.exe worked as advertised, thanks how to get the title into task manger 'window'?

pyotr filipivich on Mon, 24 Sep 2018 19:17:44
-0700 typed in alt.windows7.general the following:
Herbert Kleebauer on Sun, 23 Sep 2018 23:23:50 +0200
typed in alt.windows7.general the following:
On 23.09.2018 17:22, pyotr filipivich wrote:

Again, execute the demo batch below (don't do any modification
to it). It will change the title and wait at the pause command,
so you can see the change of the title. After you press any key,
the pause command is skipped and the batch terminates, then cmd
resets the title to the old value.

Okay, I make this batchfile. It compiles a program
"SetTitle.exe", which because I was doing all this in C:\Sandbox, was
not found by ZZ Agent.Bat. So, I need to have this code compile to
c:\{PATH} so that the batchfile can find it?


I don't understand your problems.

Did you execute the posted batch code?


Yes.

If No, we can stop here.

If you executed it, was the title changed to the new string
as long as the batch was executed (until you pressed a key)?


I think so.

If No, we can stop here.

If the title was changed, then just add the line
settitle.exe my_new_title
at the beginning of your batch file.


Ah - thank you, that was the detail which was not intuitively
obvious.

But this only works, if the program settitle.exe is available
on your computer. You can either embed it in your batch file
(as done in the demo batch) or save the program (generated from
the demo batch) somewhere on your disk. If it is stored in
C:\Sandbox, then use

C:\Sandbox\settitle.exe my_new_title

in your batch file.

If it is stored in a directory which is listed in your %PATH%
variable or in the same directory as the batch file, then it is
sufficient to use:

settitle.exe my_new_title



certutil -f -decode %~f0 settitle.exenul


can I change this to
certutil -f -decode %~f0 c:\progs\settitle.exenul
and have it work? {I know, I know, I should try it and see. B-)}


You can, but if you already have it in C:\Sandbox then just
copy the exe to c:\progs, no need to decode it again.


Okay, will try that.




Second question: is this invoked by

settitle.exe [New Title]

For use with other programs?


Settitle.exe can't be "used" with other programs. If settitle.exe
is executed from a batch file, it changes the title of the cmd window
until the batch terminates. It does not interact with any other programs
also executed in the same batch.


Okay. Sorry, I should have said "other batch files."


It worked as advertised.

I did have to mess with %path% and some other details, but it
works now!

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