How to add something to the path (PATH or system PATH)? What is% PATH% and%% something?

Here are some examples:

  1. Add the following string to the PATH , C:\Program Files (x86)\CMake 2.8\bin .

  2. Do you have to make your %PATH% environment variable? On my system, I need to add %MINGW_DIR%\bin to %PATH% .

  3. Add C:<Qt_directory>/mingw/bin to the system PATH .

I understand that you need to go to System Properties → Advanced → Environment Variables ...

And then, if we talk about PATH, then add such-and-such to the “User Variables”, and if system PATH, then “System Variables”.

Then you need to click "Create". What to enter in the "variable name"? The value of the variable should be written those lines that are given in the instructions, right?

Qt\_\_directory is probably the path to the folder with Qt. Between two % also the path to the folder? %PATH% and %MINGW_DIR% are the same, if PATH understood as the path to MinGW?

    1 answer 1

    Yes, that's right, you need to go to System Properties → Advanced → Environment Variables . There will already be PATH variables. One for the current user, the second - system-wide. Simply click on them and add the desired path through a semicolon.

    Screenshot of the “Environment Variables” dialog in the mode of editing the PATH environment variable

    Alternatively, you can write a command script in which the environment variable will change. At the same time, it can change globally for the entire system, the current session, and inside specifically the command shell in which this command script is running. See details in the article “ Update Windows Path Environment Variable[ archive ] .

    • What does% PATH% mean in your screenshot in Variable value? And what does% PATH% /% MINGW_DIR% mean? Path to some program / folder? - chevchelios
    • 2
      % PATH% is the current value of the PATH variable. Those. wording PATH = "% PATH%; c: \ cygwin \ bin" means "add to PATH the directory C: \ cygwin \ bin"% MINGW_DIR% is the value of the environment variable MINGW_DIR - gecube respectively