做网站怎么电话约客户,免费广告网,郑州网站怎么推广,photoshop免费版应用场景#xff1a; 我们#xff08;乙方#xff09;在给客户提供基于InfoPath表单#xff08;尤其是包含托管代码的#xff09;的工作流解决方案的时候#xff0c;常常需要客户#xff08;甲方#xff09;的SharePoint管理员来帮忙在安装SharePoint Server的服务器上…应用场景 我们乙方在给客户提供基于InfoPath表单尤其是包含托管代码的的工作流解决方案的时候常常需要客户甲方的SharePoint管理员来帮忙在安装SharePoint Server的服务器上部署而管理员不需要知道需要哪些步骤来完成InfoPath Service的部署更不愿意看到通过繁琐的操作来完成预定的任务。大家都知道企业软件有个特点尽可能少的Code。要想问题少的最好办法就使用尽可能少的代码。所以我们使用命令来部署InfoPath Service自动化部署InfoPath表单是最好的办法。 基本原理 使用bat命令或者PowerShell来执行SharePoint管理命令。SharePoint为管理员提供了以下部署InfoPath表单的命令%STSADM% -o RemoveFormTemplate -filename %STSADM% -o uploadformtemplate -filename %STSADM% -o deactivateformtemplate -url %SITEURL% -filename %STSADM% -o activateformtemplate -url %SITEURL% -filename 参考方案 我们现在需要客户的SharePoint管理员来重新部署我们提供的出差申请流程。 1 文件结构如下放置 2 bat脚本 SET STSADM%programfiles%\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXESET SITEURLhttps://www.cnblogs.com/sites/mingle%STSADM% -o RemoveFormTemplate -filename Mingle.FormTemplates\BusinessTripRequest.xsn%STSADM% -o execadmsvcjobs %STSADM% -o uploadformtemplate -filename Mingle.FormTemplates\BusinessTripRequest.xsn%STSADM% -o execadmsvcjobs %STSADM% -o deactivateformtemplate -url %SITEURL% -filename Mingle.FormTemplates\BusinessTripRequest.xsn%STSADM% -o execadmsvcjobs %STSADM% -o activateformtemplate -url %SITEURL% -filename Mingle.FormTemplates\BusinessTripRequest.xsn%STSADM% -o execadmsvcjobspause 如果我们第一次部署InfoPath表单可以仅使用uploadformtemplate和activateformtemplate即可。 补充说明 a、execadmsvcjobs此命令可以保证下达的任务马上执行。我们在实际部署中经常遇到部署后10多个小时新的InfoPath设计才生效。 b、为什么我们重新部署的时候需要先反激活InfoPath表单然后再重新激活呢因为InfoPath表单新的设计使用的站点不重新激活的话新的设计信息将不生效。 以上问题在我们手工部署InfoPath表单的时候也常常碰到同样的问题。 扩展阅读 在SharePoint2010中可以通过Feature来部署沙箱的InfoPath表单以下命令可供使用 Uninstall the existing solution (based on the from file name):Uninstall-SPInfoPathFormTemplate -Identity Exampleform.xsnInstall the new solution (based on the from file name):Install-SPInfoPathFormTemplate -Path C:\Form.xsnDisable feature on site collection levelDisable-SPInfoPathFormTemplate -Identity Form.xsn -Site http://SPSite Enable feature on site collection levelEnable-SPInfoPathFormTemplate -Identity Form.xsn -Site http://SPSite 转载于:https://www.cnblogs.com/mingle/archive/2011/01/30/1947930.html