Welcome!

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

SignUp Now!

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

Apr
318
7
ignores the title. Instead always displays "Administrator: <previous command>".

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

Regards, DJ.
 
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
 
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.)
 
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.
 
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.
 

Similar threads

Back
Top