安装、部署和卸载解决方案
2010-06-21 23:26
429 查看
最近工作中需要一个feature,在文档库中每个项目的下拉列表中添加一个菜单项,而且要求打包成wsp,我写了两个bat文件,一个用于安装部署,一个用于卸载。
1、安装部署:
@echo off
set /p wspLocation = Please input wsp file location:
set /p siteUrl = Please input site url:
cd C:\
cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
stsadm.exe -o addsolution -filename %wspLocation%
stsadm -o deploysolution -name myfeature.wsp -url %siteUrl% -immediate -allowCasPolicies
stsadm -o execadmsvcjobs
stsadm -o activatefeature -name MyFeature -url %siteUrl% -force
注:myfeature.wsp是解决方案的名称,MyFeature是此feature所在目录。此feature只部署在指定的某个站点集中,所以需要先指定wsp文件的位置及需要部署此解决方案的站点集地址,也因此而需要-allowCasPolicies,若要部署到所有站点集时用-allowGacDeployment
2、卸载:
@echo off
set /p siteUrl = Please enter site url:
cd C:\
cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
stsadm -o retractsolution -name myfeature.wsp -url %siteUrl% -immediate
stsadm -o execadmsvcjobs
stsadm -o deletesolution -name myfeature.wsp
1、安装部署:
@echo off
set /p wspLocation = Please input wsp file location:
set /p siteUrl = Please input site url:
cd C:\
cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
stsadm.exe -o addsolution -filename %wspLocation%
stsadm -o deploysolution -name myfeature.wsp -url %siteUrl% -immediate -allowCasPolicies
stsadm -o execadmsvcjobs
stsadm -o activatefeature -name MyFeature -url %siteUrl% -force
注:myfeature.wsp是解决方案的名称,MyFeature是此feature所在目录。此feature只部署在指定的某个站点集中,所以需要先指定wsp文件的位置及需要部署此解决方案的站点集地址,也因此而需要-allowCasPolicies,若要部署到所有站点集时用-allowGacDeployment
2、卸载:
@echo off
set /p siteUrl = Please enter site url:
cd C:\
cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
stsadm -o retractsolution -name myfeature.wsp -url %siteUrl% -immediate
stsadm -o execadmsvcjobs
stsadm -o deletesolution -name myfeature.wsp
相关文章推荐
- 安装,卸载或重装Vmware Workstation时失败的官方解决方案
- vs.2005安装部署中的卸载
- sharepoint 2013 部署解决方案 此功能已在此服务器场中安装 ID 为 guid 的功能。请使用强制属性显式地重新安装
- 关于.NET Framework 3.5 SP1 bootstrapper 包(安装和部署)的解决方案
- Linux 下Redis集群安装部署及使用详解(在线和离线两种安装+相关错误解决方案)
- 安装vmware workstations 的时候 在virtual network editor 的时候停下了 安装,卸载或重装Vmware Workstation时失败的官方解决方案
- 转:关于.NET Framework 3.5 SP1 bootstrapper 包(安装和部署)的解决方案
- 创建、部署和卸载SharePoint工作流解决方案包(WSP)
- Ubuntu12.0.4 Linux服务器部署之 安装和卸载 MySQL 5.x
- ClickOnce部署疑难杂症:更新时部署与应用程序标识不一致问题。要安装此应用程序,请修改此文件的清单版本或卸载之前存在的应用程序。
- C#程序打包与部署,包括处理安装向导中用户输入的参数,创建卸载程序。
- SHAREPOINT 2007 网站模板(解决方案)安装和卸载
- 企业级部署解决方案CRM 2011 SSRS部署报表服务器扩展程序安装 推荐
- 部署|更新|卸载MOSS解决方案包
- Zkeys安装后,IIS没有自动部署PHPMyadmin解决方案
- 安装并卸载WPS后,导致office COM组件调用失败的解决方案
- 安装完jdk,重新部署项目启动时,提示找不到jre解决方案
- vs2010部署报错,服务器场功能未激活,未安装在此服务器场中,无法添加到该范围,解决方案
- VS2010安装部署打包说明(快捷方式创建和卸载设置)
- 创建部署和卸载SharePoint工作流解决方案包