Why is my environment PATH not being permanently set in Windows?

  • Thread starter Thread starter phylotree
  • Start date Start date
  • Tags Tags
    Computers
Click For Summary

Discussion Overview

The discussion revolves around the issue of setting the environment PATH variable permanently in Windows, focusing on the differences between temporary and permanent settings, as well as methods to achieve a permanent configuration.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Homework-related

Main Points Raised

  • One participant notes that setting the PATH variable using the command line only affects the current session and does not persist after closing the command prompt.
  • Another participant suggests that to make the PATH setting permanent, it must be done through the Control Panel, specifically in the Environment Variables section.
  • It is mentioned that changes to the PATH variable may not take effect until the computer is restarted.
  • A different method is proposed for accessing the Environment Variables through the properties of "My Computer," indicating there are separate settings for system and user paths.

Areas of Agreement / Disagreement

Participants generally agree that the command line method does not set the PATH variable permanently and that using the Control Panel is necessary for a permanent change. However, there are multiple approaches suggested for accessing the Environment Variables, indicating some variation in preferences.

Contextual Notes

There is a lack of clarity regarding the exact steps and potential variations in user interfaces across different versions of Windows, which may affect the process of setting the PATH variable.

Who May Find This Useful

This discussion may be useful for users new to Windows command line operations, those seeking to understand environment variables, or individuals troubleshooting PATH configuration issues.

phylotree
Messages
48
Reaction score
2
I started my days late with computer world, but lately I have enjoyed myself pretty much with DOS command line options and usage. Today people use only mouses to click, I wonder why on Earth do people still use command prompt. But I decided to learn about environment PATH SETTING, and I am stuck now that the path isn't really set.
For instance,
C:> SET PATH=%PATH%;C:\somepath
C:>PATH

Oh yes it sets my somepath
Then I issue

C:>exit

Then reopen the command prompt in Administrator mode
C:>PATH

Oh no, my somepath is not there anymore.

Thank you.
 
Computer science news on Phys.org
I guess you are opening DOS session under Windows. If so, PATH that you see exists only for the current session, and is lost when you close the session. When you start a new session it is copied from the Windows environment variables.

DOS uses only a bastardized version of command prompt, the real thing you can find under Linux. My understanding is that if you want to experiment with a real command line under Windows you can install Cygwin, but I never tried it myself.
 
If you want it to be permanent in Windows, you need to set it through the Control Panel.
Control Panel -> System -> Advanced tab -> Environment Variables.

I have found that Windows doesn't seem to pick up the new values until you restart your computer.
 
Borg said:
If you want it to be permanent in Windows, you need to set it through the Control Panel.
or starting with "my computer":

start, right click on "my computer" -> properties -> advanced -> environment variables.

Note there are two pairs of temp paths, one pair for system, one pair for user.
 

Similar threads

Replies
9
Views
4K
Replies
9
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
11K
  • · Replies 44 ·
2
Replies
44
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K