| Related: |
![]() ![]() ![]() |
|
Variable | Sample Typical Value |
---|---|
%SystemDrive% | C: |
| C:\WINDOWS C:\WINNT |
%WinDir% | C:\WINDOWS C:\WINNT |
%SystemDirectory% | C:\WINDOWS\System32 C:\WINNT\System32 |
%ComSpec% | C:\WINDOWS\system32\cmd.exe The path including the command interpreter program. |
%programfiles% | C:\WINDOWS\Program Files |
%Temp% |
C:\Users\W\AppData\Local\Temp on Windows Vista & 2008 C:\DOCUME~1\Usr\LOCALS~1\Temp (compressed form of) C:\Documents and Settings\Usr\Local Settings\Temp |
%Tmp% | |
%HOMEDRIVE% | C: The drive letter associated with the user's home directory |
%HOMEPATH% | The path to the user's home directory as defined in UMD/AD (excluding drive):
\Users\<USERNAME> on Windows Vista & 2008 \Documents and Settings\Guest on Windows XP |
%OS% | Windows_NT (even on Windows Vista & XP machines The operating system the user is running |
%USERDOMAIN% | The name of the domain that contains the user's account. On a stand-alone machine, the same as the machine name. |
%USERNAME% | The user's name |
%USERPROFILE% | C:\Users\<USERNAME> The user's root folder |
%USERPROFILE%\Desktop | The user's desktop folder |
If you have the permissions, invoke, then open my
DOS batch file
1envvars.bat which lists the values of these variables on your computer
Windows resolves commands typed in the start/run box first from files
in
Below are dynamic environment variables:
Variable | Sample Typical Value |
---|---|
%CD% | The current directory. |
%DATE% | Current date in the format set by the Date command |
| Current time in the format set by the Time command |
%ERRORLEVEL% | A number defining exit status of a previous command or called executable. |
%RANDOM% | A random number between 0 and 32767. |
You can quickly reach the folder specified within an environment variable by
typing that variable on the Address bar of Windows Explorer:
|
Variable |
---|
%USER% |
%NWUSERNAME% |
%NWLANGUAGE% |
|
![]() ![]() ![]() |
|
echo $LOGNAME | user name used for login | |
echo $USER | user name (sudo) | |
echo $UID | user name | Solaris |
echo $SHELL | directory containing OS shell executables | |
echo $PATH | directories containing executables, searched to find applications when no absolute path is specified on the command line. | |
echo $LD_LIBRARY_PATH | path to system and user libraries | |
echo $MANPATH | directory containing manuals | |
echo $HOME | directory of user's home directory | |
echo $TZ | time zone, such as "US/Mountain" |
In UNIX systems, the colon (:).
In Windows systems, the semi-colon (;) is used.
So to list each path in a separate line:
Solaris systems have additional ones, including:
echo $BASH | path to the shell on the file system. |
echo $HOSTNAME | name of the current system. |
echo $PPID | parent process ID |
echo $WINDOWMANAGER | name of the X11 window manager |
echo $COLUMNS | The column width for the terminal |
echo $DISPLAY | The display variable used for X11 graphics. |
|
![]() ![]() ![]() |
|
![]() ![]() ![]() |
|
Variable | Sample |
---|---|
EC2_HOME | C:\EC2 where files are located |
EC2_PRIVATE_KEY | C:\EC2\pk.pem full path to file |
EC2_CERT | C:\EC2\509cert.pem full path to file |
|
![]() ![]() ![]() |
|
![]() ![]() ![]() |
![]()
| Your first name: Your family name: Your location (city, country): Your Email address: |
Top of Page ![]() Thank you! |