6
votes

We are running into an error when trying to use the MSDeploy "runCommand" provider to execute a .cmd file on a remote machine. The expected run time should be about 10 seconds, but MSDeploy only runs it for about 2-3 seconds, after which time error details are returned.

Here is the complete MSDeploy "runCommand" command line text I am using:

msdeploy.exe -verb:sync -source:runCommand="D:\web deploy tester\test_cmd.cmd",dontUseCommandExe=false,waitAttempts=5,waitInterval=1000 -dest:auto,computername=http://test-machine:89/MsDeployAgentService/,userName=aaa,password=bbb

Here are the error details returned:

Error 'Error: (4/21/2010 12:19:25 PM) An error occurred when the request was processed on the remote computer.
Error: The process 'C:\WINDOWS\system32\cmd.exe' (command line '/c "D:\web deploy tester\test_cmd.cmd"') was terminated because it exceeded the wait time.
Error count: 1.
' occurred in call to RunCommand

Any ideas as to why this is happening and how to resolve it?

1
I have the same problem, regardless of the waitInterval i specify, msdeploy immediately returns this error, when it clearly hasnt waited for the specified time before erroring. - Andrew Bullock
I noticed that when I used this in a batch file and I was using " I made the mistake of including the waitInterval inside the quote for the command path rather than outside it: ..",waitInterval.. - The Muffin Man

1 Answers

6
votes

You should specify a higher value of waitInterval. This value is in milliseconds. You might want to try 20000 (20 seconds). The default value is 1000.