In the final part of our series about porting a SharePoint 2007 based WSPBuilder project to SharePoint 2010 we discuss the changes made to our Installation scripts in order to make it work with both versions of SharePoint.
Please note that this article is based on our experiences with the beta version of SharePoint 2010. Some of the issues we have identified may have been resolved in the final release.
The following posts are part of this series:
Part 1 – Introduction / Problems installing the existing 2007 version on SP2010
Part 4 – Updating deployment scripts (This post)
The installation scripts used for deploying the SharePoint part of our solutions are simple Windows CMD scripts. Our customers appear to prefer it this way as it allows them to see what is going on and make necessary amendments to deploy the software as part of a larger deployment script. Unfortunately we cannot use PowerShell as that technology is not available on all systems.
In order to make the same script work on SharePoint 2007 as well as 2010 environments we have had to make the following changes:
Detect which version of SharePoint is installed.
Adjust the STSADM path accordingly.
Adjust the name of the WSP file accordingly as the WSP files for both environments are different.
The resulting installation script is as follows:
The changes required to the un-installation script are similar to the changes for the installation script. As the name of the Timer Service has changed between SharePoint 2007 and 2010 this name has been made dynamic as well.
The resulting script is as follows:
That’s it. We hope you have enjoyed this series. Please leave feedback if you have any questions.
Labels: Articles, News, PDF Converter, SP2010, Workflow