Skip to Main Content Skip to Search
Accelerating the pace of engineering and science

How do I set my system path under Windows?


Date Last Modified: Tuesday, January 19, 2010
Solution ID:   1-15ZLK
Product:   MATLAB
Reported in Release:   No Release
Platform:   Windows
Operating System:   Windows Any
 

Subject:

How do I set my system path under Windows?

Problem Description:

I would like to set my system path under Windows.

Solution:

On Windows NT 4.0, 2000, XP, Vista, or Windows 7, the system paths are set through the environment variables of the system. You can access these settings as follows:

Windows 2000, XP, Vista, Windows 7
******************************
1. Right-click on the My Computer icon. (Under Windows XP, Vista, or Windows 7, the My Computer Icon may be located in the start menu.)

2. Choose Properties from the context menu.

(Alternatively, you can double-click on the System icon in the Control Panel)

4. Click the Advanced tab or "Advanced system settings" on Windows Vista or Windows 7

5. Click the Environment Variables button.

6. Click on the variable called 'Path' and then click on Edit. Now add the target directory to the value of the variable, using a semi-colon as a separator.

For example, if you want to add the path to MATLAB/bin to your system, which if located at c:\matlab\bin, you would enter the following at the end of the Path:


;c:\matlab\bin
7. Restart your computer for your changes to take effect.

Windows 95, 98 or ME
******************************
The system path is set in the batch file called autoexec.bat that resides in your c:\ directory. You should open the autoexec.bat file in an editor. This can be done
as follows:

1. Double click on My Computer

2. Double click on your C drive ( or the main drive letter for your system)

3. Right click on the file autoexec.bat and select Edit

4. You want to add a PATH line to the file which would state the directory you want to add to your path. For example, if you want to add the path to MATLAB/bin to your system,
which is located at c:\matlab\bin, you would enter the following line:

PATH=%path%;c:\matlab\bin
5. Save the file

6. Restart your computer for your changes to take effect.

7. To be sure this was added to your path, open a DOS window and type path at the DOS prompt. This should return the system path which should now include the new path you just added.


Windows NT 4.0
******************************
1. Right-click on the My Computer icon.

2. Select "Properties" from the context menu.

(Alternatively, you can double-click on the System icon in the Control Panel)

4. Click the Environment tab.

5. Add the target directory to the end of the Path using a semi-colon as a separator. For example, if you want to add the path to MATLAB/bin to your system, which is located
at c:\matlab\bin, you would enter the following at the end of the Path:

;c:\matlab\bin
6. Restart your computer for your changes to take effect.

Please provide feedback to help us improve this Solution
Contact support