Results 1 to 2 of 2

Thread: set environment variables in script .bat

  1. #1
    Creezeer Guest

    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



  2. #2
    bg Guest

    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.


Similar Threads

  1. What are an Environment Variables in PHP?
    By N I C K in forum Software Development
    Replies: 5
    Last Post: 21-02-2010, 12:29 AM
  2. c# environment variables
    By EULALIA in forum Software Development
    Replies: 3
    Last Post: 13-07-2009, 02:23 PM
  3. Replies: 3
    Last Post: 15-05-2009, 11:33 PM
  4. Replies: 2
    Last Post: 01-04-2009, 05:46 PM
  5. Setting environment variables?
    By Chaz in forum Vista Help
    Replies: 3
    Last Post: 18-01-2009, 08:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •