sharepoint 部署和卸载 feature脚本
2012-05-22 17:47
274 查看
在moss 2007的定制开发中很多功能都可以通过feature完成,好处就是feature能在moss的所有网站中使用。为了方便我们进行feature的部署和卸载,通过脚本来完成部署和卸载。
部署和卸载脚本如下,需要进行适当的修改。
部署脚本:
echo Copying the feature...
echo.
rd /s /q "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential"
mkdir "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential"
copy /Y feature.xml "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential\"
copy /Y workflow.xml "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential\"
xcopy /s /Y *.xsn "%programfiles%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential\"
echo.
echo Adding assemblies to the GAC...
echo.
"c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -uf ITMS.CheSequential
"c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -if bin\Debug\ITMS.CheSequential.dll
echo.
echo Activating the feature...
echo.
pushd %programfiles%\common files\microsoft shared\web server extensions\12\bin
stsadm -o deactivatefeature -filename CheSequential\feature.xml -url http://ms-zy:9002
stsadm -o uninstallfeature -filename CheSequential\feature.xml
pause
stsadm -o installfeature -filename CheSequential\feature.xml -force
stsadm -o activatefeature -filename CheSequential\feature.xml -url http://ms-zy:9002
echo Doing an iisreset...
echo.
popd
iisreset
卸载脚本:卸载完后删除对应的feature文件夹。
echo.
echo Adding assemblies to the GAC...
echo.
"c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -uf MySharePointWorkflow1
echo.
echo Activating the feature...
echo.
pushd %programfiles%\common files\microsoft shared\web server extensions\12\bin
stsadm -o deactivatefeature -filename MySharePointWorkflow1\feature.xml -url http://ms-zy:9001 -force
stsadm -o uninstallfeature -filename MySharePointWorkflow1\feature.xml -force
echo Doing an iisreset...
echo.
popd
iisreset
http://hi.baidu.com/seapub/blog/item/20d68beecf52af202df534bd.html
部署和卸载脚本如下,需要进行适当的修改。
部署脚本:
echo Copying the feature...
echo.
rd /s /q "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential"
mkdir "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential"
copy /Y feature.xml "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential\"
copy /Y workflow.xml "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential\"
xcopy /s /Y *.xsn "%programfiles%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential\"
echo.
echo Adding assemblies to the GAC...
echo.
"c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -uf ITMS.CheSequential
"c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -if bin\Debug\ITMS.CheSequential.dll
echo.
echo Activating the feature...
echo.
pushd %programfiles%\common files\microsoft shared\web server extensions\12\bin
stsadm -o deactivatefeature -filename CheSequential\feature.xml -url http://ms-zy:9002
stsadm -o uninstallfeature -filename CheSequential\feature.xml
pause
stsadm -o installfeature -filename CheSequential\feature.xml -force
stsadm -o activatefeature -filename CheSequential\feature.xml -url http://ms-zy:9002
echo Doing an iisreset...
echo.
popd
iisreset
卸载脚本:卸载完后删除对应的feature文件夹。
echo.
echo Adding assemblies to the GAC...
echo.
"c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -uf MySharePointWorkflow1
echo.
echo Activating the feature...
echo.
pushd %programfiles%\common files\microsoft shared\web server extensions\12\bin
stsadm -o deactivatefeature -filename MySharePointWorkflow1\feature.xml -url http://ms-zy:9001 -force
stsadm -o uninstallfeature -filename MySharePointWorkflow1\feature.xml -force
echo Doing an iisreset...
echo.
popd
iisreset
http://hi.baidu.com/seapub/blog/item/20d68beecf52af202df534bd.html
相关文章推荐
- sharepoint 2010中通过命令部署和卸载FEATURE
- 如何通过PowerShell 部署Feature(SharePoint 2013)
- 如何卸载自己部署在sharepoint中的工作流
- SharePoint部署WSP解决方案包,部署Feature
- SharePoint部署WSP解决方案包,部署Feature
- SharePoint 2010部署WCF续 - feature event receiver实现自动部署
- Sharepoint 2010 使用feature部署文件
- Sharepoint 2007 定制Feature和卸载Feature
- powershell-脚本部署sharepoint解决方案
- 深入浅出SharePoint——在VS2008中正确定义Webpart并通过feature来部署
- 深入浅出SharePoint——通过Feature部署Webpart
- Sharepoint学习笔记---Upgrading&Version版本升级:Content Type Feature(一.创建和部署一个基本的Content Type Feature)
- SharePoint【学习笔记】-- 【Upgrading&Version版本升级】:Content Type Feature(一.创建和部署一个基本的Content Type Feature)
- SharePoint 部署解决方案Feature ID冲突
- 通过Feature部署Sharepoint 2013的EventReceiver
- SharePoint 部署解决方案Feature ID冲突
- feature安装和卸载的脚本
- itoo-快捷部署脚本--提高部署开发效率
- 初探SharePoint部署 – WSS Solution Package
- 简单的nginx一键部署脚本