Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
How do I set PATH and other environment variables?

In windows (XP) how can I easily append to PATH permanently.

I know that you can change it by going to My Computer -> Properties -> Advanced -> Environment Variables

However since I find myself doing this so often, I'm looking for a faster way.

Ideally it would be an executable or batch file that asks what to append, does the job then disappears.

Any ideas?

share|improve this question

marked as duplicate by slhck, Daniel Beck, random Jul 10 '11 at 2:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Everything you need will most probably be covered in there. –  slhck Jul 9 '11 at 5:05
    
windows key+pause/break gets as far as properties. if you use setx then be careful to append and not "permanently" wipe your path. –  barlop Jul 9 '11 at 21:29

1 Answer 1

up vote 1 down vote accepted

Batch file is the easiest way. Just punch this into a batchfile:

Set /p INPUT= Type the path to append
set PATH = %INPUT%;%PATH%
share|improve this answer
    
that is not so well done..main problem with that is he'd probably sometimes or often want it permanent as the GUI does, then he'd want setx if doing it from CLI. if he puts in a path that has spaces then it won't work so well, the path would need to be in quotes. Also better to put the appended path AFTER so set path=%path%;.... it's more secure that way I think.. 'cos otherwise a commonly named exe could be sneaked into a non-standard directory and get executed instead of the proper exe. –  barlop Jul 9 '11 at 21:47
    
No doubt this is a quick and dirty method, but it fits his specifications, which is, I quote "asks what to append, does the job then disappears." I presumes he knows what he's doing if he's appending a path, as that isn't a run of the mill request. –  surfasb Jul 10 '11 at 2:03
    
He wants an alternative to the GUI. The GUI is permanent. So he wants setx or something using setx not set. I don't know what you mean by "presume he knows what he's doing" Mentioning set path=%path% as you do, presumes less knowledge of him than mentioning some details of it and mentioning setx. But set /p is perhaps not quite as well known. –  barlop Jul 10 '11 at 9:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.