[icoSystem.png]Sitemap
[icoDocs.png]Documents
[icoFolderApps.png]Program files
[icoFolderWin.png]Windows
[icoFolderWin.png] Windows[icoShell.png] Windows shell tips
[icoShell.png]
 Windows shell tips (10nov2009)
Modifying environment variables
Instead of using the graphic interface, you can change permanently an environmental variable with setx, part of the 'Windows XP Service Pack 2 Support Tools'
Adding/removing from Path
To add/remove entries from path, it is less messy and safer use pathman, part of 'Windows 2003 Resource Kit'
Windows Script Host
Check documentation about the 'Windows Script Host'. Forget batch files and learn to write shell scripting in javascript.
Windows environmental variables
VariableExample (2k/XP)Example (W7)
%ALLUSERSPROFILE%C:\Documents and Settings\All UsersC:\ProgramData
%APPDATA%C:\Documents and Settings\{username}\Application DataC:\Users\{username}\AppData\Roaming
%COMPUTERNAME%{computername}
%COMMONPROGRAMFILES%C:\Program Files\Common Files
%COMMONPROGRAMFILES(x86)%C:\Program Files (x86)\Common Files
%COMSPEC%C:\Windows\System32\cmd.exe
%HOMEDRIVE%C:
%HOMEPATH%\Documents and Settings\{username}\Users\{username}
%PATH%C:\Windows\system32;C:\Windows;{other paths}
%PATHEXT%.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.WSF;.WSH.com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.msc
%PROGRAMFILES%C:\Program Files
%PROGRAMFILES(X86)%C:\Program Files (x86)
%PROMPT%$P$G
%SYSTEMDRIVE%C:
%SystemRoot%C:\Windows
%TEMP% , %TMP%C:\Documents and Settings\{username}\Local Settings\TempC:\Users\{username}\AppData\Local\Temp
%USERNAME%{username}
%USERPROFILE%C:\Documents and Settings\{username}C:\Users\{username}
%WINDIR%C:\Windows
%PUBLIC%C:\Users\Public