Welcome to my site. Please CLICK HERE to give your opinions regarding this new look of "PCTipsbyAnu". Thanks for visiting.

Monday, June 28, 2010

Browse » Home » , , , » Windows Environment Variable

Windows Environment Variable

http://uppitywoman08.files.wordpress.com/2009/07/microsoft-sign.jpg

From a command window, DOS script, or any other shell code the Windows environment variables in the list below can be referenced by adding a “%” before and after the variable name. 

All of these values are returned as strings. The values can be piped (the “>” command in a “DOS window”) to text files or used in other scripting languages. Also, here are detailed descriptions of some of the more common environment variables.

For example, to find the user profile folder and write it to a textfile:

1. Open a command console (”cmd” at the Run… prompt).

2. Type “echo %userprofile% > C:\file.txt” and press Enter. The path to that resource will be printed to screen. (Without the “> C:\file.txt” the value is printed to a line in the command window)

3. Open the C:\file.txt file and the path to the currently logged on user’s profile will be listed.

Windows Environment Variable List
• ALLUSERSPROFILE
• APPDATA
• CD
• CLIENTNAME
• CLUSTERLOG (probably only on Windows Server clusters)
• CMDCMDLINE
• CMDEXTVERSION
• COMMONPROGRAMFILES
• COMPUTERNAME
• COMSPEC
• DATE
• ERRORLEVEL
• FP_NO_HOST_CHECK (only with FrontPage installed?)
• HOMEDRIVE
• HOMEPATH
• HOMESHARE
• LOGONSEVER
• NUMBER_OF_PROCESSORS
• OS
• PATH
• PATHEXT
• PROCESSOR_ARCHITECTURE
• PROCESSOR_IDENTFIER
• PROCESSOR_LEVEL
• PROCESSOR_REVISION
• PROGRAMFILES
• PROMPT
• RANDOM
• SYSTEMDRIVE
• SYSTEMROOT
• TEMP or TMP
• TIME
• USERDOMAIN
• USERNAME
• USERPROFILE
• WINDIR
You can leave a response, or trackback from your own site.

About 'Anu': My name is 'Anu' also Known as 'ANU 007 TIGER' .I'm administrator of 'PC Tips by Anu' blog .This blog was opened for sharing contents about hacking n cracking.
Thanks YAHOO OR GMAIL

0 comments:

Post a Comment

 
Back to Top