Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I need is a way to launch a remote application and nothing more. I have an automated test run that functions fine remotely, but I need to launch the application as part of the deployment process rather than the test process. PSExec launches the application, but it maintains its connection to the process and never releases. This will cause my deployment to time out and then the test run fails due to the deployment failure. I created a second script to kill the PSExec process, but it never runs since the first script never finishes. When I manually use these two scripts I can make the entire Build-Deploy-Test process function with my intervention, but I cannot get them to function as part of the deployment process itself.

In addition to this problem, I have an issue with the credits, version info and copyright info being seen as invalid commands when the deployment process initiates the script and this is causing the deployment process to fail.

Is there some simpler tool that does nothing other than launch the application remotely? If not, is there a way to remove the credits, et al without breaking the PSExec file and some other way to close the PSExec process?

share|improve this question

I'm not sure exactly what you mean by "it maintains its connection to the process and never releases," but, how about using PSExec to do something like

psexec \\computer -d -s "%systemroot%\system32\cmd.exe /c c:\someprogram.exe"

The definition of the -d switch is "Don't wait for the application to terminate. The -s switch means run as Local System. Using the /c switch with cmd.exe means exit cmd.exe after the command is done, instead of leaving the shell open.

share|improve this answer

PSExec has a problem when issuing multiple calls from the same computer to the same computer. Let's say your computer's name is "Alpha" and server name is "Tango" issuing 3 parallel PSExec's from "Alpha" to "Tango" will cause this. If I recall correctly, PSExec uses NamePipes which cause this issue.

If the process hangs, go to the server upon which you issued the PSExec ("Tango") open the services and look for "psexesvc" and stop it. You can use the command line "net stop" or even "sc" if you need.

Now for a solution - I recommend that you use WinRS and WinRM instead of PSExec. It's much faster, more stable and allows concurrent connections.

I hope that helps, Idan.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.