ProblemYou want to be able to add environment variables to XP, so that scripts and certain programs can operate properly. SolutionUsing a graphical user interface
Using a command-line interfaceAt the command prompt, use this syntax to set an environment variable: > set variablename=variablevalue For example, to set the variable ProgramFilesc to the value C:\Program Files, you'd type this at a command prompt and press Enter: > set variablename=variablevalue That will set the environment variable only temporarily, and only in the command prompt; it won't affect the rest of the system. To set permanent environment variables, use the GUI as detailed in the earlier part of this recipe. DiscussionEnvironment variables that contain information about the environment for the system and/or for the currently logged on user are used for a wide variety of purposes for example, to determine where to place files such as temporary files, what the root drive is, and where the Windows directory is. They're often used in scripting as well. Windows contains a variety of environment variables by default, such as defining the root directory and the Windows directory. If you're at the command prompt and want to see the current environment variables, type set and press Enter. You'll see a list like this: PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 15 Model 1 Stepping 2, GenuineIntel PROCESSOR_LEVEL=15 PROCESSOR_REVISION=0102 ProgramFiles=C:\Program Files PROMPT=$P$G SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\DOCUME~1\PRESTO~1\LOCALS~1\Temp TMP=C:\DOCUME~1\PRESTO~1\LOCALS~1\Temp USERDOMAIN=PRESTONGRALLA USERNAME=Preston Gralla USERPROFILE=C:\Documents and Settings\Preston Gralla windir=C:\WINDOWS See AlsoMS KB 310519, "How To Manage Environment Variables in Windows XP" |