1.

Solve : save environment variable with set path?

Answer»

Hi,

I am setting some ENVIRONMENT variables with set path.

(the one for python for precision:

set path=%path%;C:\python25
)

I notice that If I close the prompt and open again it I need to set it again.
I know that if I want I can set it by rightclicking on system-->preferences-->environment variables. I just wonder if there is a way to set it with the prompt and save it in the way that it always stay.

thank you very much PaoloQuote from: creativewave on January 06, 2008, 11:08:11 AM


I am setting some environment variables with set path.

(the one for python for precision:

set path=%path%;C:\python25
)

I notice that If I close the prompt

You're opening a command prompt window, and this is what you are referring to when you say, "If I close the prompt" .... right?

Quote
and open again it I need to set it again.
I know that if I want I can set it by rightclicking on system-->preferences-->environment variables. I just wonder if there is a way to set it with the prompt and save it in the way that it always stay.

Are you using WinXP?


Here, using WIN98SE, within the Properties of the Dos shortcut, I have it set to automatically run a batch file every time I open the command prompt window.
I expect that you should be able to do that with XP too.

Then it is simple. Just put whatever commands you want in that batch file.
In your example, you'd be setting the path. ( I LIKE to load doskey ).

From then on, whenever you open a command prompt window with that shortcut, your path would be set right then.

I hope this helps.




Discussion

No Comment Found