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

  • Thread starter Thread starter phylotree
  • Start date Start date
  • Tags Tags
    Computers
AI Thread 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.
 
Thread 'Urgent: Physically repair - or bypass - power button on Asus laptop'
Asus Vivobook S14 flip. The power button is wrecked. Unable to turn it on AT ALL. We can get into how and why it got wrecked later, but suffice to say a kitchen knife was involved: These buttons do want to NOT come off, not like other lappies, where they can snap in and out. And they sure don't go back on. So, in the absence of a longer-term solution that might involve a replacement, is there any way I can activate the power button, like with a paperclip or wire or something? It looks...
This week, I saw a documentary done by the French called Les sacrifiés de l'IA, which was presented by a Canadian show Enquête. If you understand French I recommend it. Very eye-opening. I found a similar documentary in English called The Human Cost of AI: Data workers in the Global South. There is also an interview with Milagros Miceli (appearing in both documentaries) on Youtube: I also found a powerpoint presentation by the economist Uma Rani (appearing in the French documentary), AI...
Back
Top