Installing and Deploying Web Part Solutions Using Stsadm Utility in SharePoint

Hello Friends,

From Microsoft TechEd, Stsadm is a command line tool for administration of Office SharePoint servers and sites. Stsadm has been included in Microsoft Office SharePoint Server 2007 and MOSS 2010. Stsadm provides a method for performing the Office SharePoint Server 2007 administration tasks at the command line or by using batch files or scripts. Stsadm provides access to operations not available in the Central Administration site, such as changing the administration port. The command-line tool has a more streamlined interface than Central Administration, and it allows you to perform the same tasks. There are certain operations and certain parameters that are only available by using the Stsadm command-line tool.

Point to Note: You must be an administrator on the local computer to use Stsadm.

File located at: Stsadm is located at the following path on the drive where SharePoint Products and Technologies are installed: %WINDOWS DRIVE%\%PROGRAMFILES%\Common Files\microsoft shared\web server extensions\12\bin

To deploy web parts to the server, use the following procedure:

  1. Delete the previous solution from the store if it exists
  2. Add a solution to the store
  3. Deploy the solution to the store

The following is the procedure to be used:

  1. Go to the "Start" Menu then select "Run" then type "cmd" then hit Enter.

    image1.gif
     
  2. If you have configured your command window's path to locate the Stsadm command, it will run else it will throw the error "stsadm is not recognized as an internal or external command". To check this, type stsadm and hit Enter. If you do not see the following error, skip to step 3.

    image2.gif
     
  3. To delete a solution from the store if it exists, type the following command:

    stsadm -o deletesolution -name {Name of .wsp file} -override

    Rename the .wsp file with you .wsp file name and hit Enter.

    image3.gif
     
  4. To add a solution to the store, type the following commad in the command window:

    stsadm -o addsolution -filename {Complete path of .wsp file}

    Rename the .wsp file with the complete path of your .wsp file name and hit Enter.

    image4.gif
     
  5. To deploy the solution to the store, type the following commad in the command window:

    stsadm -o deploysolution -name {Name of .wsp file} -url {URL OF Site to deploy solution} -local -allowGacDeployment

    Rename the .wsp file with the name of your .wsp file name and hit Enter.

    image5.gif

The solution will be deployed to the SharePoint server and you can activate the feature by going to "Site Settings" - "Site Collection Features" on the SharePoint site or you can activate the feature using Stsadm.

Please let me know your feedback/comments on this. I will be publishing another article about the install/uninstall feature using Stsadm shortly. Subscribe to get the latest news from the blog!


Rebin Infotech
Think. Innovate. Grow.