SET X = Y permantly via a cmd prompt?

  • Thread starter Thread starter Kim Noer
  • Start date Start date
K

Kim Noer

Hi there..

Is there a way to set user environment variables permantly via either a
script or a simple batch file?
 
Pegasus said:
There is: setx.exe from the Win2000 Resource Kit will do it.
Note that any variable set like this will be visible to all new
processes but will have no effect on existing processes.
You can probably do it via a registry hack too.

Thanks a bunch for the tip.
 
Pegasus (MVP) wrote in
There is: setx.exe from the Win2000 Resource Kit will do it.
Note that any variable set like this will be visible to all new
processes but will have no effect on existing processes.

You can probably do it via a registry hack too.

True enough but let's not forget the provided GUI interface at System
Properties, Advanced. Environment variables...
 
Pegasus (MVP) wrote in
I thought the OP's question was how to do it with
a script or a simple batch file, and NOT with a GUI
as you propose?

You are of course correct. The question did indeed ask for non-GUI
answer. Pardon me.
 
Back
Top