我正在将 sharepoint 2010 自定义文档库模板部署为解决方案文件并将其激活到我的站点。当我删除解决方案并停用该功能时,我还想删除从此模板创建的库及其所有内容。我有一个执行停用的uninstaller.bat 文件,我想在卸载程序中包含库删除脚本。是否可以通过 stsasdm 命令删除库?
问问题
1785 次
2 回答
3
您可以编写一个功能接收器http://msdn.microsoft.com/en-us/library/ms469501.aspx在功能停用时运行,它将为您处理删除。
于 2011-04-25T13:27:09.397 回答
1
You can use Forcedeletelist, but you will need to know the URLs of the libraries you want to delete. Note, despite the name, this command will not delete the list if AllowDeletion is set to false.
Two things to consider:
- In SharePoint 2010, stsadm has been deprecated in favor of PowerShell.
- To me, it would make more sense to perform this operation in the FeatureDeactivating method of a Feature Receiver instead of in a script.
于 2011-04-25T13:17:25.640 回答