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).
- Close your current instance of DOS prompt.
- Open Control Panel
- Open System
- Click Advanced (Tab)
- Find Environment Variables
- System Variables – look for PATH
- Append the current path with ;C\Program Files\Common Files\Microsoft shared\Web server extensions\12\bin
Now, open your DOS again and try your deployment again.
It should now be successfully deployed.