As you've already read, there are multiple ways to accomplish this.
I assume you mean to change the PATH environment variable for the SYSTEM
as opposed to the USER and have it take effect for all of Windows. If you
just want to change it for your current TCC session it gets even easier.
If you look up help on SET you can see there are a number of switches that
effect what gets set.
Display, create, modify, or delete environment variables.
SET [/A /D /E /P /R file... /S /U /V /X] [name[=][value ]]
file: One or more files containing variable definitions
/A(rithmetic) /S(ystem variables)
/D(efault variables) /U(ser variables)
/E(nv vars) /V(olatile variables)
/R(ead from file) /X override VariableExclude
/P(ause)
The SET /S command will set a value into the registry at the key
"HKLM\System\CurrentControlSet\Control\Session Manager\Environment".
The SET /U command will set a value into the registry at the key
"HKCU\Environment"
The SET /V command will set a value into the registry at the key
"HKCU\Volatile Environment"
The SET /D command will set a value into the registry at the key
"HKU\.DEFAULT\Environment"
Note that none of the above commands will modify your current TCC
environment with the following caveat:
If the "Update Environment on System Change" configuration option is set,
TCC will monitor the WM_SETTINGCHANGE message and update the environment
from the User, Volatile, and System registry entries. The update is done
whenever TCC displays the prompt (to prevent the environment from changing
in the middle of a command). Unless you have a specific need for this
option it's better not to enable it, as it can result in variables set by
TCC's parent process being destroyed.
If you specify the /E switch in combination with the above switches, both
the registry value and the current TCC environment will be set.
If you just want to modify the current TCC environment you can use either
ESET or SET.
SET PATH=%PATH;new_path
or ESET PATH
-Scott
CWBillow <> wrote on 06/17/2009 09:40:56 PM:
> How can I add a folder to the system path?
>
> Regards,
> Chuck Billow
>
>
>
>