Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I modify the system PATH environment variable using script (or even a registry setting) so that when Windows boots it's already configured?

share|improve this question
up vote 2 down vote accepted

My google-fu was lacking earlier. The way to do this is using the SETX tool:

SETX NEWVAR %systemroot%\system32\inetsrv /M
share|improve this answer

You can find environment variables at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment.

share|improve this answer
Thanks...all I needed for now was to be able to set them in a batch file. But bookmarked for future ref. – Kev Sep 7 '09 at 13:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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