在用户使用 IIS 导入部署包并完成安装后,有没有办法触发自定义脚本(或打开 Windows 应用程序)?
有什么帮助吗?
尝试获取 msdeploy.exe 的帮助。
msdeploy.exe -help -postSync
或 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"