2014-01-09 17 views
2

我使用WebDeploy 3.0和清單文件,其中包含contentPathrunCommandWebDeploy 3.0 RunCommand通過WebDeploy代理執行得太快

<siteManifest> 
    <contentPath path="C:\Test\Path" /> 
    <runCommand path="echo hello" /> 
</siteManifest> 

我遇到,之前contentPath提供商同步的文件(僅目錄)的runCommand正在執行的問題 - 只有當通過代理從遠程計算機上執行。

以下是輸出時通過WebDeploy直接執行:

Info: Using ID 'xxx' for connections to the remote server.  
Info: Adding siteManifest (siteManifest). 
Info: Adding virtual path (C:\Test\Path) 
Info: Updating runCommand (echo hello). 
Info: hello 
Info: The process 'C:\Windows\system32\cmd.exe' (command line '') exited with code '0x0'. 
Info: Using ID 'xxx' for connections to the remote server. 
Info: Adding file (C:\Test\Path\File) 

不知道如何停止RunCommand之前發生的事情:當通過WebDeploy代理執行

Info: Using ID 'xxx' for connections to the remote server.  
Info: Adding siteManifest (siteManifest). 
Info: Adding virtual path (C:\Test\Path) 
Info: Adding file (C:\Test\Path\File) 
Info: Updating runCommand (echo hello). 
Info: hello 
Info: The process 'C:\Windows\system32\cmd.exe' (command line '') exited with code '0x0'. 

以下是輸出contentPath使用WebDeploy代理時?

+0

您能澄清一下「web部署代理」嗎?你是指MSDeploy代理服務(需要管理員用戶)還是Web管理服務(msdeploy.axd,不需要管理員用戶)? (另外,嘿邁克!) –

+0

我的意思是我相信MSDeploy代理服務(嗨Rich!)。 – TheCodeKing

回答

1

這聽起來像是它對遠程執行所經歷的提交階段有所幫助。雖然我無法提供直接解決方案,但您是否考慮將您的runCommand移動到postSync

msdeploy -verb:sync^
     -source:manifest=manifest.xml^
     -dest:auto,computerName=...^
     -postSync:runCommand="echo hello" 
+0

感謝理查德:)因爲兼容性的各種原因,我們希望通過清單文件而不是從命令行執行命令。它看起來像postSync是目前唯一的選擇。 – TheCodeKing