1

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?

Kev
  • 7,877
  • 18
  • 81
  • 108

2 Answers2

3

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

SETX NEWVAR %systemroot%\system32\inetsrv /M
SETX PATH %PATH%;%NEWVAR% /M
Kev
  • 7,877
  • 18
  • 81
  • 108
1

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

Sergius
  • 281
  • 5
  • 9
  • Thanks...all I needed for now was to be able to set them in a batch file. But bookmarked for future ref. – Kev Sep 07 '09 at 13:03