技术开发 频道

sharepoint 中 webpart 安装批处理文件


【IT168技术文档】

  考虑到 webpart 安装过程异常繁琐且容易出错,就写了个批处理脚本,无论是用在Webpart的调试上,还是真正要安装webpart 感觉方便了好多!而且是“绿色安装”。感兴趣的话可以参照下面脚本:
@echo off @echo ************************** @echo *Web Part 安装* @echo ************************** @echo 请选择: @echo 1.安装请按 A @echo 2.卸载请按 B @echo 3.退出请按 C choice /c:abc if errorlevel 3 goto cancel if errorlevel 2 goto uninstall if errorlevel 1 goto install :cancel goto end :uninstall @echo 确定卸载该Web Part ? choice /c:yn if errorlevel 2 goto end if errorlevel 1 goto yes :yes stsadm.exe -o deletewppack -name webPart.cab goto end :install @echo 安装到: @echo 1.程序集(GAC)请按 A @echo 2.程序bin目录请按 B @echo 3.取消安装请按 C @echo ... 30秒后将自动选 A ... choice /T 30 /c abc /D a if errorlevel 3 goto end if errorlevel 2 goto bin if errorlevel 1 goto gac :gac stsadm.exe -o addwppack -force -globalinstall -filename webPart.cab goto end :bin stsadm.exe -o addwppack -force -filename webPart.cab :end @echo goodbye! pause
0
相关文章