setting an environmental variable from command prompt


  1. Posts : 4
    Windows 7 - 64 bit
       #1

    setting an environmental variable from command prompt


    I live in the Linux world, so this might be a stupid question to Windows users.

    I need to set an environmental variable. I know I can do this through the control panel, but what a pain in the ass.

    If I open a command prompt and use the "set" command, the variable seems to last only as long as the commend prompt session is open.

    How do I set an environmental variable from the command prompt so that it lives beyond the command prompt session?

    And while I'm at it, can someone recommend a book that explains how the Windows OS works? I'm not looking for a "Windows for Dummies" presentation, but one that goes a little deeper ... something akin to "Linux in a Nutshell".
      My Computer


  2. Posts : 5,440
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #2
      My Computer


  3. Posts : 4
    Windows 7 - 64 bit
    Thread Starter
       #3

    The link shows how to set a variable through the Command Panel. My question is: Can an environmental variable be permanently set from the command prompt?
      My Computer


  4. Posts : 5,440
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #4

    Not one for me I'm afraid. i will have to leave that to others!
      My Computer


  5. Posts : 5,642
    Windows 10 Pro (x64)
       #5

    SetX - Set environment variables | SS64.com
    setx is built in Windows 7.
      My Computer


  6. Posts : 4
    Windows 7 - 64 bit
    Thread Starter
       #6

    Thanks a million, LogicEarth!

    Can you recommend a good book that explains how the Windows OS works? Something like "Linux in a Nutshell", not "Windows for Dummies"?
      My Computer


  7. Posts : 5,642
    Windows 10 Pro (x64)
       #7

    Are you wanting a deep down level of the Windows Kernel and how it does things?
    There is Windows Internals: Windows Internals Book

    Otherwise I don't really know, I never really used a book to learn Windows or Linux.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 23:26.
Find Us