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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.