Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: setting an environmental variable from command prompt

05 Sep 2012   #1
newboid

Windows 7 - 64 bit
 
 
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 System SpecsSystem Spec
.
05 Sep 2012   #2
mitchell65

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

My System SpecsSystem Spec
05 Sep 2012   #3
newboid

Windows 7 - 64 bit
 
 

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 System SpecsSystem Spec
.

06 Sep 2012   #4
mitchell65

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Not one for me I'm afraid. i will have to leave that to others!
My System SpecsSystem Spec
06 Sep 2012   #5
logicearth

Windows 10 Pro (x64)
 
 

SetX - Set environment variables | SS64.com
setx is built in Windows 7.
My System SpecsSystem Spec
06 Sep 2012   #6
newboid

Windows 7 - 64 bit
 
 

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 System SpecsSystem Spec
06 Sep 2012   #7
logicearth

Windows 10 Pro (x64)
 
 

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 System SpecsSystem Spec
Reply

 setting an environmental variable from command prompt




Thread Tools




Similar help and support threads
Thread Forum
Command Prompt command <ipconfig> not working
when I open up my command prompt and type 'ipconfig' without the ' and press enter it returns the line: 'ipconfig' is nto recognized as an internal or external command, operable program, or batch file I am trying to find out the information I need in order to set up a static IP Address for port...
Network & Sharing
Command Prompt Color - Registry setting doesn't work for this combo.
Here's an anomaly. In my W7 Ultimate Administrator Command Prompt, I'm trying to set the colors as follows: Screen Background: 192, 192, 192 Screen Text: 0, 0, 255 You can see the selection area by right-clicking the Title Bar (or the little black box at top left) and clicking Properties...
General Discussion
Command Prompt: Repeat del command continuosly
Hi All, I'm running a program that parses .csv files and then changes them into ._OK files. This process takes longer when there are a large number of *.OK files in the folder where the files being converted are located. To remedy this I occasionally manually run this command: del *._OK ...
General Discussion
Setting the window icon for a command prompt window
I have a set of scheduled tasks, all of which run programs written in Open Object REXX. Consequently, the Command Prompt windows where these tasks runs inherit their icons (at the top left of the window) from the rexx.exe program that handles my scripts. This means that all of these REXX tasks...
General Discussion
Run administrative command prompt from command prompt
Ok So I got myself into a unique bind here. I was trying to install some custom system files (for a theme) and I did it wrong and now I cant open explorer.exe . I dont want to goto a backup because this is a easy fix. (in my view). So I need to know how to run command prompt with administrative...
General Discussion


Our Sites

Site Links

About Us

Find 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 04:26.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App