在下载了sharepoint 的解决方案模板以后,准备安装。由于解决方案比较多,也就想偷个懒,于是写了个批处理。install.bat如下:
@ECHO OFF
ECHO.安装20个应用网站模板
pause
cls

set path=%path%;E:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
set filepath=D:\sharepoint\sharepointTemplate\wsp\

stsadm -o addsolution -filename %filepath%ApplicationTemplateCore.wsp
stsadm -o deploysolution -name ApplicationTemplateCore.wsp -allowgacdeployment -immediate
stsadm -o copyappbincontent
echo core

stsadm -o addsolution -filename %filepath%AbsenceVacationSchedule.wsp
stsadm -o deploysolution -name AbsenceVacationSchedule.wsp -allowgacdeployment -immediate
echo 1

stsadm -o addsolution -filename %filepath%BudgetingTrackingMultipleProjects.wsp
stsadm -o deploysolution -name BudgetingTrackingMultipleProjects.wsp -allowgacdeployment -immediate
echo 2

stsadm -o addsolution -filename %filepath%BugDatabase.wsp
stsadm -o deploysolution -name BugDatabase.wsp -allowgacdeployment -immediate
echo 3

stsadm -o addsolution -filename %filepath%CallCenter.wsp
stsadm -o deploysolution -name CallCenter.wsp -allowgacdeployment -immediate
echo 4

stsadm -o addsolution -filename %filepath%DocumentLibraryReview.wsp
stsadm -o deploysolution -name DocumentLibraryReview.wsp -allowgacdeployment -immediate
echo 5

stsadm -o addsolution -filename %filepath%ChangeRequest.wsp
stsadm -o deploysolution -name ChangeRequest.wsp -allowgacdeployment -immediate
echo 6

stsadm -o addsolution -filename %filepath%ComplianceProcessSupport.wsp
stsadm -o deploysolution -name ComplianceProcessSupport.wsp -allowgacdeployment -immediate
echo 7

stsadm -o addsolution -filename %filepath%ContactsManagement.wsp
stsadm -o deploysolution -name ContactsManagement.wsp -allowgacdeployment -immediate
echo 8

stsadm -o addsolution -filename %filepath%EventPlanning.wsp
stsadm -o deploysolution -name EventPlanning.wsp -allowgacdeployment -immediate
echo 9

stsadm -o addsolution -filename %filepath%ExpenseReimbursementApproval.wsp
stsadm -o deploysolution -name ExpenseReimbursementApproval.wsp -allowgacdeployment -immediate
echo 10

stsadm -o addsolution -filename %filepath%HelpDesk.wsp
stsadm -o deploysolution -name HelpDesk.wsp -allowgacdeployment -immediate
echo 11

stsadm -o addsolution -filename %filepath%InventoryTracking.wsp
stsadm -o deploysolution -name InventoryTracking.wsp -allowgacdeployment -immediate
echo 12

stsadm -o addsolution -filename %filepath%ITTeamWorkspace.wsp
stsadm -o deploysolution -name ITTeamWorkspace.wsp -allowgacdeployment -immediate
echo 13

stsadm -o addsolution -filename %filepath%JobRequisition.wsp
stsadm -o deploysolution -name JobRequisition.wsp -allowgacdeployment -immediate
echo 14

stsadm -o addsolution -filename %filepath%KnowledgeBase.wsp
stsadm -o deploysolution -name KnowledgeBase.wsp -allowgacdeployment -immediate
echo 15

stsadm -o addsolution -filename %filepath%LendingLibrary.wsp
stsadm -o deploysolution -name LendingLibrary.wsp -allowgacdeployment -immediate
echo 16

stsadm -o addsolution -filename %filepath%PhysicalAssetTracking.wsp
stsadm -o deploysolution -name PhysicalAssetTracking.wsp -allowgacdeployment -immediate
echo 17

stsadm -o addsolution -filename %filepath%ProjectTrackingWorkspace.wsp
stsadm -o deploysolution -name ProjectTrackingWorkspace.wsp -allowgacdeployment -immediate
echo 18

stsadm -o addsolution -filename %filepath%RoomEquipmentReservations.wsp
stsadm -o deploysolution -name RoomEquipmentReservations.wsp -allowgacdeployment -immediate
echo 19

stsadm -o addsolution -filename %filepath%SalesLeadPipeline.wsp
stsadm -o deploysolution -name SalesLeadPipeline.wsp -allowgacdeployment -immediate
echo 20

ECHO.
ECHO 安装完成


ECHO.
pause

可是问题出来了,解决方案没有部署好,创建网站集的时候就是没见应用程序选项。这下急了,咋了。
于是重新添加解决方案,系统提示已存在该解决方案。
于是我就在重新deployment解决方案,系统提示某个作业已计划或正在运行时,不能删除解决方案。
系统提示在部署,不过我要等到什么时候呢,无法忍受,应为执行deletesolution也不行。
于是就先取消部署(canceldeployment),很郁闷的是,canceldeployment 接受的参数是id,不是name.那么我们要怎样获取解决方案的id呢?我使用的是enumsolutions命令。不过列出来的解决方案的id不能拷贝(不清楚把命令行里面的内容拷贝出来),郁闷中。我想只好直接去数据库找了。要么重命令行里面一个一个敲出来,会要人命哦!


如有更好的方法,忘高手指教!
posted on 2008-04-13 22:40  阿拉伯顶峰  阅读(785)  评论(1编辑  收藏  举报