set environment variables in script .bat
Hello every body,
I'd like to make a script which sets JAVA_HOME in environment variables
after the installation of java sdk.
When I use the command "SET", JAVA_HOME is not in environment variables of
the system, it is just set in envrironment variables of my script.
How can I set JAVA_HOME in environment variables of my system (Windows 2003
server Standard Edition) ?
Thanks
Re: set environment variables in script .bat
On Mar 6, 7:51 am, "Creezeer" <nore...@noreply.com> wrote:
> Hello every body,
>
> I'd like to make a script which sets JAVA_HOME in environment variables
> after the installation of java sdk.
>
> When I use the command "SET", JAVA_HOME is not in environment variables of
> the system, it is just set in envrironment variables of my script.
> How can I set JAVA_HOME in environment variables of my system (Windows 2003
> server Standard Edition) ?
>
> Thanks
There are a couple of options:
Create the entry by importing a .reg file
Write it directly to the registry [HKEY_LOCAL_MACHINE\SYSTEM
\CurrentControlSet\Control\Session Manager\Environment]
Use setx.exe from the resource kit
Good luck.