views:

194

answers:

1

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?

A: 

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.

Sayed Ibrahim Hashimi
Thanks for the response, Sayed. I have tried your suggestion and have even given the process up to a few minutes to complete, but this does not resolve the issue. Also, according to the runCommand documentation, it appears the setting you mentioned is the length of the interval between retries, not the time allowed for the remote command to complete its execution before timing-out.The .cmd can be run from the command prompt on the local machine without any problem and the account running the operation has admin-level privileges. Any other theories as to why this is occurring?
mjw.