From: Pegasus [MVP] on


"Cindy Parker" <cypy(a)live.com> wrote in message
news:4bf57064$0$6986$9b4e6d93(a)newsspool4.arcor-online.net...
> Ok, I know. In a batch file I can change environment variables temporarily
> (=for the
> current, remaining session) be entering e.g.
>
> set CLASSPATH=D:\newpath;%CLASSPATH%
>
> However these changes are not visible outside of the current session and
> furthermore they
> are lost after a reboot.
>
> Is there a(nother) way to change them PERMANENTLY from batch script?
>
> I can imagine that there is a way by a regedit or VisualBasic script or
> 3rd party cmdline tool.
>
> Again: I don't want to edit them manually e.g. in the "System" dialog in
> control panel.
> The change should take place on cmdline from a script
>
> Cindy
>

Here are a couple of options:
- setx.exe (Win2000 Resource Kit)
- setenv.exe (ftp://barnyard.syr.edu/pub/vefatica/setenv.exe)

Note that with either tool the change will only affect processes launched
*after* you issue this command. It has no effect on pre-existing processes.

From: Twayne on
In news:4bf57064$0$6986$9b4e6d93(a)newsspool4.arcor-online.net,
Cindy Parker <cypy(a)live.com> typed:
> Ok, I know. In a batch file I can change environment
> variables temporarily (=for the
> current, remaining session) be entering e.g.
>
> set CLASSPATH=D:\newpath;%CLASSPATH%
>
> However these changes are not visible outside of the
> current session and furthermore they
> are lost after a reboot.
>
> Is there a(nother) way to change them PERMANENTLY from
> batch script?
>
> I can imagine that there is a way by a regedit or
> VisualBasic script or 3rd party cmdline tool.
>
> Again: I don't want to edit them manually e.g. in the
> "System" dialog in control panel.
> The change should take place on cmdline from a script
>
> Cindy

Try Google or your favorite Seach Engine, whatever it might be. Maybe:
batch "permanent environment" +change
or similar.