Why is psExec hanging indefinitely and giving no error?

I'm simply attempting to open calculator on a remote machine in order to test the connection before I write a bigger script. I'm no pro with psexec yet, but I have never seen before what is happening and cannot find an answer to this question anywhere.

I'm attempting every version I know of the simple command: psexec \\target calc

My computer is running Windows 7 Enterprise. The target is running Windows 2008 R2.

When I hit 'Enter' the command seems to run as it should initially. I get the two messages about "Connecting..." and "Starting psexec...", but then nothing happens. Calculator doesn't start on the target computer, psexesvc doesn't start, I don't get any errors or messages, and I don't get control back in the cmd window I ran the command from. I have to close it.

Here is what I have tried different combinations of:

  • The -i and -d switches.
  • -u and -p with both my normal account and admin account
  • -accepteula, /accepteula, and using accepteula twice as per this post
  • Ran psExec on the target machine to manually accept the License Agreement that pops up the first time it is used
  • Checked that the Admin$ share was enabled
  • Followed most of the directions from karlchen in this post and successfully ran the three lines of code suggested.
  • Searched through any articles that seemed relevant in the psExec FAQ on the Sysinternals forums.
  • Executed programs other than calculator, like cmd and a simple batch file I put on the target's desktop
  • Left the cmd window open for a few hours just to see if it was taking it's time
  • Ran psExec at other target machines (successfully) to see if my computer is the problem
  • psList and psService work on the target computer
  • Ran cmd as administrator
  • Can successfully run this command at other servers with the same antivirus setup
  • Tried everything suggested in the two answers that have been given

None of those things changed the results or helped me find a way to change them. What else can I try for troubleshooting this problem?


Solution 1:

If UAC is enabled on the target computer, you might need to turn it off. I tried it just now on a target machine that has UAC disabled, and it worked, though I got some quirky results.

Solution 2:

I built an application that uses PSExec and had the same issues. Here are the steps I took to ensure it worked:

Things to try:

  • If either machine has antivirus, this may be causing it to hang.

  • Ensure your login details for the server/share are correct, as this may also cause it to hang.

  • Ensure the machine you are trying to connect to is accessible (you can see it within the network).