我使用以下腳本安裝/卸載解決方案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