‘sts’ is not recognized as an internal or external command

While deploying custom webpart projects (.wsp files) on your production SharePoint 2007 Application Server when Visual Studio deployment option is not available to you, development teams often resort to the magic ofstsadm for deploying custom solutions on SharePoint Application Server.

Using Dos prompt when you attempt to run this operation on C:\Program Files\Common Files\Microsoft shared\web server extensions\12\bin>stsadm -o addsolution -filename webpartname.wsp

It sometimes results in the following error

‘sts’ is not recognized as an internal or external command, operable program or batch file.

What is happening that the default system paths are not recognising your ‘…./12/bin/’ path. To resolve this issue, do the following (Win Server 2003 R2 SP1 – other Server versions might be roughly the same).

  1. Close your current instance of DOS prompt.
  2. Open Control Panel
  3. Open System
  4. Click Advanced (Tab)
  5. Find Environment Variables
  6. System Variables – look for PATH
  7. Edit
  8. Append the current path with ;C\Program Files\Common Files\Microsoft shared\Web server extensions\12\bin
  9. OK

Now, open your DOS again and try your deployment again.

It should now be successfully deployed.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s