Welcome!

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

SignUp Now!

Done in titleprompt specify username as local or domain

May
320
6
if in titleprompt I use $u, it shows the username, without specify if it is local or of the domain.
Thank You and regards
Rodolfo Giovanninetti
 
You can use the %userdomain variable to get the login domain. (Double the percent sign so it will be evaluated when the prompt is displayed.)
 
Or strongly quote it.

1728054844450.webp
 
Wandering a bit off-topic here: Would it be useful to have a @USERNAME function which returns the current user's name in a variety of different formats, as @COMPUTERNAME does the computer's?

It would be trivial to do: @USERNAME would just expose GetUserNameExW() as @COMPUTERNAME exposes GetComputerNameExW(). The question is whether this would actually be of use to anyone.
 
That would unlikely to be useful, as it is set once. You can set PROMPT to %LOGONSERVER\%%USERNAME at system level, for example, and forget about it for the next century.
 
Back
Top