部署命令
@SET STSADM="c:\program files\common files\microsoft shared\web server extensions\14\bin\stsadm.exe"
%STSADM% -o addsolution -filename <<解决方案包名字>>
%STSADM% -o deploysolution -name "<<解决方案包名字>>" -immediate -allowGacDeployment
%STSADM% -o activatefeature -filename "<<feature路径>>\feature.xml" -url "<<网站URL>>"
pause
卸载命令
@SET STSADM="c:\program files\common files\microsoft shared\web server extensions\14\bin\stsadm.exe"
%STSADM% -o deactivatefeature -filename "<<feature路径>>\feature.xml" -url "<<网站URL>>"
%STSADM% -o retractsolution -name "<<解决方案包名字>>" -immediate
%STSADM% -o deletesolution -name "<<解决方案包名字>>"
pause
部署和回收wsp,使用stsadm命令
Code
部署
"%systemdrive%\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename OfficeSpaceFeature.wsp
"%systemdrive%\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name OfficeSpaceFeature.wsp -immediate – allowGacDeployment -force
"%systemdrive%\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs
回收
"%systemdrive%\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o retractsolution -name OfficeSpaceFeature.wsp -immediate
"%systemdrive%\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs
"%systemdrive%\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deletesolution -name OfficeSpaceFeature.wsp