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.

3
  • 2
    ATTENTION: DO NOT USE THE POSTED COMMAND LINE TO REDEFINE THE SYSTEM ENVIRONMENT VARIABLE PATH! It is an absolute NO GO - NEVER EVER to redefine system or user environment variable Path with command SETX using the string value of the local environment variable referenced with %Path%. The result is a system Path with all environment variable references expanded, with folder paths of user Path appended resulting in duplicates in concatenated local Path and perhaps removed folder paths caused by truncation of command SETX.
    – Mofi
    Commented Jun 2, 2022 at 18:37
  • The redefinition of system or user Path from within a Windows command prompt window or using a batch file is really difficult, see for example Why are other folder paths also added to system PATH with SetX and not only the specified folder path? The batch code in this post is much better, but is nevertheless not 100% fail-safe.
    – Mofi
    Commented Jun 2, 2022 at 18:43
  • Users should click on Windows Start menu button, type on keyboard environment and Windows offers in language of Windows Edit the system environment variables and Edit environment variables for your account. Then the user should click on one of the two items to open the dialog window in which the user can modify safely the system and user environment variables. For more details about Path management see also What is the reason for "X is not recognized as an internal or external command, operable program or batch file"?
    – Mofi
    Commented Jun 2, 2022 at 18:49