• sharepoint 部署和卸载 feature脚本


    在moss 2007的定制开发中很多功能都可以通过feature完成,好处就是feature能在moss的所有网站中使用。为了方便我们进行feature的部署和卸载,通过脚本来完成部署和卸载。

    部署和卸载脚本如下,需要进行适当的修改。

    部署脚本:

    echo Copying the feature...
    echo.
    rd /s /q "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential"
    mkdir "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential"

    copy /Y feature.xml "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential\"
    copy /Y workflow.xml "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential\"
    xcopy /s /Y *.xsn "%programfiles%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\CheSequential\"

    echo.
    echo Adding assemblies to the GAC...
    echo.
    "c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -uf ITMS.CheSequential
    "c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -if bin\Debug\ITMS.CheSequential.dll

    echo.
    echo Activating the feature...
    echo.
    pushd %programfiles%\common files\microsoft shared\web server extensions\12\bin
    stsadm -o deactivatefeature -filename CheSequential\feature.xml -url http://ms-zy:9002
    stsadm -o uninstallfeature -filename CheSequential\feature.xml

    pause

    stsadm -o installfeature -filename CheSequential\feature.xml -force
    stsadm -o activatefeature -filename CheSequential\feature.xml -url http://ms-zy:9002

    echo Doing an iisreset...
    echo.
    popd
    iisreset

    卸载脚本:卸载完后删除对应的feature文件夹。

    echo.
    echo Adding assemblies to the GAC...
    echo.
    "c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -uf MySharePointWorkflow1

    echo.
    echo Activating the feature...
    echo.
    pushd %programfiles%\common files\microsoft shared\web server extensions\12\bin
    stsadm -o deactivatefeature -filename MySharePointWorkflow1\feature.xml -url http://ms-zy:9001 -force
    stsadm -o uninstallfeature -filename MySharePointWorkflow1\feature.xml -force

    echo Doing an iisreset...
    echo.
    popd
    iisreset

    http://hi.baidu.com/seapub/blog/item/20d68beecf52af202df534bd.html

  • 相关阅读:
    scrapy 命令行传参 以及发送post请求payload参数
    scrapy框架+selenium的使用
    python 制作GUI页面以及多选框、单选框
    上线操作
    在Linux中使用selenium(环境部署)
    解读Java NIO Buffer
    Maven自定义Archetype
    解决spark streaming集成kafka时只能读topic的其中一个分区数据的问题
    在windows下使用pip安装python包遇到缺失stdint.h文件的错误
    maven-shade-plugin插件未生效原因分析
  • 原文地址:https://www.cnblogs.com/Areas/p/2513650.html
Copyright © 2020-2023  润新知