Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Start late with Computers

  1. May 27, 2012 #1
    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

    Oh yes it sets my somepath
    Then I issue


    Then reopen the command prompt in Administrator mode

    Oh no, my somepath is not there anymore.

    Thank you.
  2. jcsd
  3. May 28, 2012 #2


    User Avatar

    Staff: Mentor

    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.
  4. May 28, 2012 #3


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    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.
  5. May 30, 2012 #4


    User Avatar
    Homework Helper

    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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook