I tend to keep the PATH clean of stuff I'm not using.
In my
C:\Users\Michael\bin directory, which
is in the PATH, I've got a number of batch files that add stuff to the path as needed.
For example,
C:\Users\Michael\bin\g++.bat:
1 2 3
|
@echo off
path C:\MinGW\bin;%PATH%
g++ %*
|
This does two useful things. I can use g++ normally, no matter whether the PATH has been initialized for it nor not, but also, once the path
is initialized, typing "g++" recurs to the correct program (and not my batch file).
The other method is just to set your system PATH. Start Windows Explorer (click the icon on your task bar or use Start and type "explorer" in the box). Click on "Computer" in the left pane. Click on "System Properties" at the top taskbar. Click "Advanced System Settings" on the left. Click the "Environment Variables" button. Add a new variable (or edit the existing one, if any) named "PATH" and add the directory or directories you wish to have in the path, separated by semicolons.
For example, you could create the new variable "PATH" with a value of "C:\MinGW\bin;".
Hope this helps.