Psexec action fails, psexec manually works

I have psexec set up to call iisreset /stop on a web server.  If I use the psexec action in finalbuilder, it returns error code 87.  If I copy and paste the parameters logged for this action into a command prompt to call psexec manually, it works fine.  I have tried it with a few other programs and I get an error as well, but different return code.

Any ideas what can cause this?  The psexec action works fine on my machine but not on my build machine.  Also I have checked and the pstools directory is set properly in FB options.

Here is the output from the psexec action in FB:

Command line : psexec \\webserver -u domain\Administrator -p "*PASSWORD*" -accepteula iisreset /STOP
Return code : 87
Action Failed.
 

Hi Eric

I’m not able to reproduce this here. What version of pstools and windows and FinalBuilder are you using… and can you post the full output of the psexec action?

I am using psexec v1.96 (I downloaded it today). Finalbuilder 6.3.0.1712. Win 2003. I am using this setup for my own machine and it works fine. Same set up on my build machine where its failing.

Unfortunately, that is the whole output from psexec action.

I will look at some things on my end, I must have something configured incorrectly on my build machine. But its strange that calling psexec manually works with the same params.

Here is an error I found on the web server (target machine). Do you know of any differences in the psexec action vs. calling psexec manually? I am not familiar with where the file path below is coming from, but it has FB in it, so maybe its something finalbuilder is doing that calling psexec manually isn’t? BTW, I did check component services and dcom is enabled and connection protocols are there as well.

Event Type: Error
Event Source: DCOM
Event Category: None
Event ID: 10009
Date: 10/22/2009
Time: 11:26:01 AM
User: N/A
Computer: WEBSERVER
Description:
DCOM was unable to communicate with the computer Settings\Temp\1\FB_PSExec_radC6714.tmp using any of the configured protocols.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

I have narrowed down the cause of psexec action failing to be the redirection of standard output and standard error to finalbuilder. If I uncheck these 2 options in the psexec action, it executes fine and returns error code 0.

Can you shed some light on how FB is redirecting the console output to finalbuilder? I must have some windows policy or other setting on my build machine that is preventing this from working. Any insight would be appreciated.

Thanks

Hi Eric

We do have to jump through hoops to redirect the output of psexec. The reason that a bug psexec makes redirection difficult. What we do is actually run cmd.exe and have it execute psexec and it does the redirection of stdout and stderror.

One thing that might be a possible cause is if your TEMP environment variable has been overriden. Make sure you have not defined a variable with that name (this causes all sorts of problems for all sorts of programs).