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
The discussion centers around the use of the DOS command line and issues with setting the PATH environment variable in Windows. A user expresses frustration that changes made to the PATH variable are not retained after closing the command prompt. It is clarified that modifications to the PATH in a command prompt session only apply to that session and are lost upon exit. To make changes permanent, users must adjust the PATH through the Control Panel under System settings, specifically in the Environment Variables section. It is noted that Windows may require a restart for new values to take effect. Additionally, there is a mention of Cygwin as an option for those seeking a more robust command line experience on Windows, compared to the limited DOS command prompt.
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.
 
I am having a hell of a time finding a good all-in-one inkjet printer. I must have gone through 5 Canon, 2 HP, one Brother, one Epson and two 4 X 6 photo printers in the last 7 yrs. all have all sort of problems. I don't even know where to start anymore. my price range is $180-$400, not exactly the cheapest ones. Mainly it's for my wife which is not exactly good in tech. most of the problem is the printers kept changing the way it operate. Must be from auto update. I cannot turn off the...

Similar threads

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