Manipulating Environment Variables
Last Updated: 27 Mar 2004
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*** PLEASE NOTE: Link(s), If Provided, May Be Wrapped ***
The environment variables can be manipulated with the
following tools:
GUI
• (NT4)
Control Panel --> System Applet --> Environment
• (Win2K)
Control Panel --> System Applet --> Advanced --> Environment
COMMAND LINE
• SET .................... Native Command
• PATHMAN.EXE ............ Resource Kit
• SETX.EXE ............... Resource Kit
• KIXTART ................ Resource Kit
• PERL ................... Resource Kit
• SETENV ................. http://www.netexec.de/fs_lstools.html
To obtain the list of native environment variables, type
the following at the command line:
SET
In NT4 and Win2K, you can do much more with environment
variables than under Win9x. See:
CMD /?
SET /?
FOR /?
CALL /?
GOTO /?
SETLOCAL /?
ENDLOCAL /?
Environment variables are stored in the following
registry locations:
System: HKLM\SYSTEM\CCS\Control\Session Manager\Environment
User: HKU\.....\Environment
Easiest way to find items in the registry is to search
with REGEDIT...
WHITEPAPER & TECH DOCUMENTS
• http://www.winnetmag.com/windowsnt20002003faq/Article/ArticleID/23873/windowsnt20002003faq_23873.html
• http://labmice.techtarget.com/scripting/variables.htm
• http://support.microsoft.com/?KBID=100843
• http://www.jsiinc.com/SUBD/TIP1700/rh1786.htm
PERSONAL NOTES
• Win9x/ME does not have the rich set of default
environment variables that NT/2000/XP has. You also
need to jump through a few more hoops to set variables
that stick (outside of AUTOEXEC.BAT)
• If you decide to set the PATH variable manually via
the registry, ensure that it remains a REG_EXPAN_SZ
rather than an REG_SZ
RELATED TOPICS (ALSO IN THIS ARCHIVE)
• http://KB.UltraTech-llc.com/?File=Scripting.TXT
• http://KB.UltraTech-llc.com/?File=Console.TXT
• http://KB.UltraTech-llc.com/?File=ResKit.TXT
• http://KB.UltraTech-llc.com/?File=RegEdit.TXT
• http://KB.UltraTech-llc.com/?File=Quotes.TXT