Results 1 to 3 of 3

Thread: How to change/add environment variables from command line PERMANENTLY?

  1. #1
    Join Date
    Nov 2005
    Posts
    91

    How to change/add environment variables from command line PERMANENTLY?

    If I am opening a command prompt in Windows XP and type - set FOOBAR=D:\test\project, then the environment variable FOOBAR is set for this command prompt session to the new value. But it is not changed for the global environment of the whole machine? To change it for the global machine I have always to go to, Control Panel > System > Advanced tab > Environment Variable Button and then change it manually there. Can anyone tell me a way to change the global env varible values from comman line? Thanks.

  2. #2
    Join Date
    Jan 2006
    Posts
    605

    Re: How to change/add environment variables from command line PERMANENTLY?

    After you have run the set command then run of the below commands as well:
    setx.exe (Win2000 Resource Kit)

  3. #3
    Join Date
    Jun 2006
    Posts
    625
    I think that in Windows XP SP2 there is a tool named setx.exe that lets you to change global Environment variables from the command line itself.

Similar Threads

  1. Importance of Command Line User Environment in Linux
    By aFRODITA in forum Operating Systems
    Replies: 4
    Last Post: 12-11-2010, 06:31 AM
  2. Replies: 5
    Last Post: 11-11-2010, 10:10 AM
  3. Remove system environment variable using command line ?
    By Vilius Mockűnas in forum Windows Server Help
    Replies: 1
    Last Post: 12-06-2009, 04:10 PM
  4. Replies: 3
    Last Post: 15-05-2009, 11:33 PM
  5. XP screen resolution change from command line ?
    By Kalav in forum Windows XP Support
    Replies: 2
    Last Post: 23-09-2008, 06:45 PM

Posting Permissions

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