UserName

From Environment Variables
Jump to: navigation, search

UserName environment variable returns the name (logon ID) of the user that is currently logged on. [1]

echo %UserName%
Administrator

Default value

UserName environment variable doesn't have default value. The value of UserName environment variable depends on the user currently logged on.

References

  1. Environment Variable Reference

See also

AllUsersProfile | AppData | CD | ClientName | CmdCmdLine | CmdExtVersion | CommonProgramFiles | ComputerName | ComSpec | Date | ErrorLevel | HomeDrive | HomePath | LocalAppData | LogonServer | Number Of Processors | OS | Path | PathExt | Processor Architecture | Processor Identifier | Processor Level | Processor Revision | ProgramFiles | Prompt | Random | SessionName | SystemDrive | SystemRoot | Temp | Time | Tmp | UserDnsDomain | UserDomain | UserName | UserProfile | WinDir


Personal tools
Namespaces

Variants
Actions
Navigation
Catalogue
Google AdSense
Tools