| Related: |
|
|
| Variable | Sample Typical Value |
|---|---|
| %SystemDrive% | C: |
| | C:\WINNT C:\WINDOWS |
| %WinDir% | C:\WINNT C:\WINDOWS |
| %SystemDirectory% | C:\WINNT\System32 C:\WINDOWS\System32 |
| %ComSpec% | C:\WINNT\system32\cmd.exe |
| %programfiles% | C:\WINNT\Program Files |
| %Temp% | C:\DOCUME~1\Usr\LOCALS~1\Temp from 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 (excluding drive):
\Documents and Settings\Guest |
| %OS% | Windows_NT (even on Windows XP machines The operating system the user is running |
| %USERDOMAIN% | The name of the domain that contains the user's account |
| %USERNAME% | The user's name |
| %USERPROFILE% %USERPROFILE%\Desktop | The user's desktop folder |
These system environment variables are automatically created by Windows upon boot-up in Windows Registry key HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Session Manager\ Environment
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 | Sample Typical Value |
|---|---|
| %USER% | Novell environment variables: |
| %NWUSERNAME% | |
| %NWLANGUAGE% |
Novell adds these environment variables during installation.
Within a command batch file, to list Oracle Environment Variables
echo ORACLE_SID = %ORACLE_SID% echo ORACLE_HOME = %ORACLE_HOME% echo ORA_NLS = %ORA_NLS% echo. echo PATH = %PATH% echo. echo Machine Name to messenger service: net name
|
|
|
| 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. |
|
|
|
|
|
|
| Your first name: Your family name: Your location (city, country): Your Email address: |
Top of Page Thank you! | |||