Friday, February 19, 2010

SharePoint Solution (.wsp) smartsolutionupgrade STSADM

Hi All,
Yesterday,I came across one nice feature from "Trentacular SharePoint 2007 Features" CodePlex, here is a link

Actually, I have created custom site definition and it has some custom site pages, I have created SharePoint Solution package (.wsp) file to deploy it.
Now I have created 10 sites from this site definition after few days I need to change in few SharePoint features and custom site pages. Now I wanted to upgrade this changes on already existing 10 sites.
When I upgrade command using stsadm -o upgreadesolutions it upgrade the solution but to get effect of that upgraded solution to existing 10 sites i need to deactivate features of site pages and activate it. that thing i wanted to automate. I do not want to loop through each site and deactivate feature and activate it.

I got above nice solution that does smart upgrade it make inventory of features installed on your .wsp file and which site it is activated. It will upgrade solutions
deactivate features and activate it again and your task is done :)

Really really nice features we should use it for smartupgradation

Let us know your comments on it.

It has following features

smartexecjobdefs stsadm command

An stsadm command that kicks of one-time scheduled jobs and monitors for their completion before returning control
smartsolutionupgrade stsadm command
An stsadm command that performs Solution upgrades in a smart manner
stsadm -o smartsolutionupgrade [ -filename ] [ -filenamelist ]
Actions performed

1. Accepts as input either a single Solution filename or a filename of a text file containing a list of Solutions to be upgraded
2. Extracts and parses the Solution manifest file from each existing Solution to be upgraded in order to determine the Features that will be affected by the upgrade
3. Inventories the deployment states of the existing Solutions
4. Inventories the activation states of the affected Features at all scopes within the SharePoint Farm
5. Deactivates all affected Features
6. Retracts each of the existing Solutions and deletes them from the Solution store
7. Adds the updated Solution to the Solution store
8. Deploys each of the upgraded Solutions according to their previous deployment state
9. Activates all affected Features according to their previous activation state

SharePointKings Team


Anonymous said...


Does it perform upgrades on exisiting sites in custom pages as well? specially if they are modified from SharePoint designer?

SharePoint Kings said...

no idea, not tried anytime
you give it a try and see the results :)

Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to