部署后,执行脚本 - MSDeploy [英] Execute script after deployment - MSDeploy

查看:442
本文介绍了部署后,执行脚本 - MSDeploy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法来触发自定义脚本(或打开一个Windows应用程序)的用户导入使用IIS部署包并完成安装后?

任何帮助吗?

解决方案

尝试帮助的msdeploy.exe。

msdeploy.exe -help -postSync

或 <一href="http://technet.microsoft.com/en-us/library/ee619740(WS.10).aspx">http://technet.microsoft.com/en-us/library/ee619740(WS.10).aspx

  msdeploy -verb:同步 - 源:的contentPath =C:\ Test1的
    -dest:的contentPath =C:\ Test2的 -  preSYNC:runco​​mmand =APPCMD停站点
    MyWebSite-postSync:runco​​mmand =APPCMD起始位点MyWebSite

msdeploy -verb:同步 - 源:的contentPath =C:\ Test1的
    -dest:的contentPath =C:\ Test2的 -  preSYNC:runco​​mmand =C:\ MyBatchFile.bat

msdeploy -verb:同步 - 源:的contentPath =C:\ Test1的
    -dest:的contentPath =C:\ Test2的-postSync:runco​​mmand =C:\ MyBatchFile.bat
 

Is there a way to trigger a custom script (or open a windows app) after a user imports the deployment package using IIS and completes the installation?

Any help?

解决方案

Try help for msdeploy.exe.

msdeploy.exe -help -postSync

or http://technet.microsoft.com/en-us/library/ee619740(WS.10).aspx

msdeploy -verb:sync -source:contentPath="C:\Test1"
    -dest:contentPath="C:\Test2" -preSync:runcommand="Appcmd stop sites
    MyWebSite" -postSync:runcommand="Appcmd start sites MyWebSite"

msdeploy -verb:sync -source:contentPath="C:\Test1"
    -dest:contentPath="C:\Test2" -preSync:runcommand="c:\MyBatchFile.bat"

msdeploy -verb:sync -source:contentPath="C:\Test1"
    -dest:contentPath="C:\Test2" -postSync:runcommand="c:\MyBatchFile.bat"

这篇关于部署后,执行脚本 - MSDeploy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆