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 8.1 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 8.1 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
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
SSH command prompt
Is there any way I can use ssh or something similar to enter command line prompts from my Mac terminal, similar to SSH but windows commands? (From mac to a windows 7 desktop)
Performance & Maintenance
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
Command Prompt
Ok so every time I try to open the command prompt using an external source (batch file, small c++ program i made to say Hi to me through the command prompt) it instantly closes. Does anyone have any idea why this is happening and if so how can I fix it? Thanks, Wave
General Discussion
command prompt bug ?
Hi, I just tryed to use cmd as usual but it seems that I can't explore an other HDD than C: It bugs me I don't understand why i'm the only user on my computer and I am admin on it I at home so it should work but when I type "cd d:" I get that : ...
General Discussion
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

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 05:31.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App