WAD START /ELEVATED "Title" /PGM "job.btm"

Apr 13, 2010
236
3
58
The Hague
ignores the title. Instead always displays "Administrator: <previous command>".

Workaround: do a separate TITLE within job.btm after starting.

Regards, DJ.
 
Apr 13, 2010
236
3
58
The Hague
Okay, but why don't you use that workaround behind the scenes, if a title change is what you promise?

Will you at least please add this exception to the documentation so that other users will not bother you again with silly questions?

Regards, DJ
 

rconn

Administrator
Staff member
May 14, 2008
10,885
97
Okay, but why don't you use that workaround behind the scenes, if a title change is what you promise?
That's far more difficult than you imagine -- TCC would have to already know either the window title (which is created by Windows, not TCC), or the handle to the parent window that displays the caption. (And many apps have multiple parent windows, so this isn't a reliable means of determining & setting the title.)
 
Apr 13, 2010
236
3
58
The Hague
Surprising. Then how does START normally figure out the pid of the process just launched? Doesn't the pid give you a way to reliably find that handle?

If not, would you confirm that you are going to change the docs?

Regards, DJ.
 

rconn

Administrator
Staff member
May 14, 2008
10,885
97
Surprising. Then how does START normally figure out the pid of the process just launched? Doesn't the pid give you a way to reliably find that handle?
Unless you specify /ELEVATED, START uses the CreateProcess API. But CreateProcess doesn't support starting an elevated app, so START has to use a different (and much more limited) API, which does not support (1) setting the title, and (2) returning the PID. And even if START determines the PID, it still cannot reliably determine what window in that process is the main window displaying the title bar.