我使用以下脚本安装/卸载解决方案SharePoint解决方案的部署 - SharePoint 2007中
Uninstall.bat
@echo off
echo *****************************************************
echo Un-Installing <solution> -
echo (C) <company>. All rights reserved.
echo *****************************************************
set stsadm="%programfiles%\common files\microsoft shared\web server extensions\12\bin\stsadm.exe"
echo Retracing solution.wsp
%stsadm% -o retractsolution -name solution.wsp -immediate -allContentURLs
%stsadm% -o execadmsvcjobs
echo Wait till the solution retraction is completed (check the central administration)
pause
echo Deleting solution from the solution store
%stsadm% -o deletesolution -name solution.wsp -override
%stsadm% -o execadmsvcjobs
echo - Restarting WSS Timer service
net stop "windows sharepoint services timer"
net start "windows sharepoint services timer"
echo Uninstallation completed successfully
echo.
pause
INSTALL.BAT
@echo off
set STSADM="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe"
echo *****************************************************
echo Installing <solution> -
echo (C) <company>. All rights reserved.
echo *****************************************************
echo Adding solution.wsp to the solution store
%STSADM% -o addsolution -filename solution.wsp
echo Deploying solution
%STSADM% -o deploysolution -name solution.wsp -force -immediate -allowGacDeployment -allContentURLs
%STSADM% -o execadmsvcjobs
echo Installation completed successfully
IISRESET
Restarting SharePoint Timer Service..
NET STOP SPTIMERV3
NET START SPTIMERV3
REM echo copying resources..
REM %STSADM% -o copyappbincontent
echo.
pause
但部署后,install.bat卡在execadmsvcjobs
。当我检查TaskManager时,CPU使用率猛增至100%,STSADM.EXE和OWSTIMER.EXE消耗大量内存。所以部署将永远运行。
任何想法?
什么在你的情况 – 2011-01-10 18:32:03
该解决方案http://stackoverflow.com/questions/4646646/feature-event-handler-called-multiple-times-for-farm-level-feature-sharepoint-2/4647028#4647028是服务器非常慢的问题和根本原因。我在特征事件处理程序中使用了一个静态变量,并防止被多次调用。 – NLV 2011-01-17 03:57:46