Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    You're looking for the setx command, built into Windows 7 or available on older versions with the Resource Kit. Commented Aug 2, 2013 at 7:14
  • Yes something like setx i have tried 'setx path C:\mypath' but above code replacing existing path values at the same time i what a command to remove this path from environment variable Commented Aug 2, 2013 at 7:19
  • If you want to append a directory to the path, you need to include the current %PATH%: setx path ^%PATH^%;C:\mypath. Commented Aug 2, 2013 at 8:55
  • %PATH%: setx path ^%PATH^%;C:\mypath it is now working Commented Aug 2, 2013 at 9:22