Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Location
    Groningen, Groningen, Netherlands
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Windows environment

    Hi all,
    I'm looking for a solution to edit/add/delete the master environment variables under Windows (any version). The api-call 'SetEnvironmentVariable' does not bring me the solution I need. Has anyone got a clue?
    Thanks!
    WizJos

  2. #2
    Silver Lounger
    Join Date
    Apr 2001
    Location
    New York, New York, USA
    Posts
    2,328
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Windows environment

    Environment variables are used by many programs to read in additional information at startup. E.g. the PATH environment variable tells the shell where to look for executables, thus allowing you to run many programs without having to specify the full path of the binary.

    Windows NT and its successors know two types of environment variables: System variables can be changed only by the administrator and affect all users, whereas user variables affect only the user who set them for his own environment. Both are set in the System applet of the System settings group. Select the "Environment" tab in the pop-up dialog and click on the entry that you want to edit. The present value of the variable will be displayed in a separate edit field. Change the value or append new values to the semicolon-separated list. Click Set (clicking OK alone is not sufficient). To create a new environment variable, enter a new name into the provided edit field, and set a value as described above.

    On Windows 95/98/ME, all environment variables are set in the autoexec.bat file with an entry like set VARIABLE=VALUE. You will have to reboot the computer to let the changes take effect.

    On Windows NT, click Windows-Pause/Break keys, on Sysem Properties window click Environment tab.
    On Windows 2000/XP, click Windows-Pause/Break keys, on Sysem Properties window click Advanced tab, then Environment Variables button.

  3. #3
    3 Star Lounger
    Join Date
    May 2001
    Location
    Burlington, KS, USA
    Posts
    209
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Windows environment

    If you have a copy of reg.exe, you can also add system environment variables by editing the registry through a batch file as:

    <hr>reg add "HKLMSYSTEMCurrentControlSetControlSession ManagerEnvironmentVarName=Value" %1<hr>
    The postings on this site are my own and do not necessarily represent the position or opinion of WCNOC.

Posting Permissions

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