Tuesday, January 20, 2009

The simple matter of adding the stsadm path to the Path Environment variable

All the time to use the stsadm command, you have to drill down to the bin folder in the Program Files directory a.k.a. to the c:\program files\common\microsoft shared\web server extensions\12\bin folder. To drill down to this folder every time you have to use the command is annoying at best!

To get around this, just add the stsadm path (c:\program files\common\microsoft shared\web server extensions\12\bin) to the Path environment variable. The steps to do this are:
  1. Right-click My Computer and go to properties
  2. Click the Advanced tab
  3. Click the Environment Variables button
  4. Under the System Variables list, look for the Path variable.
  5. Double-click the Path variable to edit it.
  6. Add ;C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN or add the shortcut ;%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\12\BIN to the end of the Path variable
  7. Click OK three times and you are done! Now, if you go to the command prompt, you do not have to drill down to the stsadm path. You can use it directly since the path is saved in the Path environment variable.