Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. How to set the value of a system environment variable from the command line?

How to set the value of a system environment variable from the command line?

Scheduled Pinned Locked Moved IT & Infrastructure
tutorialquestionworkspace
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Henry Snell
    wrote on last edited by
    #1

    Is it possible to set the value of a system environment variable from the command line? If yes, how? (NT 4.0, Windows 2000, XP) Thanks.

    N 1 Reply Last reply
    0
    • H Henry Snell

      Is it possible to set the value of a system environment variable from the command line? If yes, how? (NT 4.0, Windows 2000, XP) Thanks.

      N Offline
      N Offline
      Nick Pirocanac
      wrote on last edited by
      #2

      Check out: http://www.winnetmag.com/Articles/Index.cfm?ArticleID=5379 Here is the relevent blurb: If you want to use a batch file to assign values to variables, use the Setx resource kit utility. Setx is a powerful tool with which you can manage the environment variables in NT. This utility has three modes of operation: command line, Registry, and file. The command-line and Registry modes are the most common. You can find that utility in the NT Resource Kit. Good luck! Nick. Nick.

      A 1 Reply Last reply
      0
      • N Nick Pirocanac

        Check out: http://www.winnetmag.com/Articles/Index.cfm?ArticleID=5379 Here is the relevent blurb: If you want to use a batch file to assign values to variables, use the Setx resource kit utility. Setx is a powerful tool with which you can manage the environment variables in NT. This utility has three modes of operation: command line, Registry, and file. The command-line and Registry modes are the most common. You can find that utility in the NT Resource Kit. Good luck! Nick. Nick.

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Thanks!!!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups