Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am running PsExec from a batch file to run another batch file on a remote system. Here's the basic line:
C:\Tools\psexec \\xxx.xxx.xxx.xxx -u administrator -p password -i C:\ProgToBeRunRemotely.cmd
Here's what PsExec responds with:
PsExec v1.94 - Execute processes remotely
Copyright (C) 2001-2008 Mark Russinovich
Sysinternals - www.sysinternals.comP requires Windows NT/2000/XP/2003.
I'm running the batch file on my Windows XP system, and the remote batch file is on a Windows 2000 system. I've run the exact line from the batch file outside of the batch file, and it works, so I know it's not a problem with PsExec, but I'm at a loss as to what in my batch file could be interfering with it. Has anyone ever seen PsExec respond in this manner?

Update:
It seems to result from how I'm calling PsExec. I'm running my batchfile from a directory other than C:\Tools; apparently PsExec doesn't care for that. I was hoping to not have to copy PsExec to the %windir% directory; if anyone has any ideas on how to get around this, it'd make me quite happy!

I tried adding that right before the psexec command, but it still didn't like it (gave the same response). I think that since it does work when PsExec is in %windir% I will end up going that route. <sigh> Still, it's a learning experience. :)
Thanks!

This is puzzling me. Does it work if you add C:\Tools to your PATH environment variable? Add it to System Variables using Control Panel -> System Properties dialog -> Advanced tab -> Environment Variables button.
Remember to remove psexec.exe from %windir% to test if it works from C:\Tools when it's in the PATH.

Unfortunately, the wheels of progress necessitated changes to the script right away, and it's been adapted for the %windir% approach. I've been trying to see if I could duplicate the message PsExec was giving me, but so far I haven't been able to (even after writing a little mini-script that was as close to the original as I could get); apparently I've officially left the Twilight Zone. :)
Thanks for your help!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |