WishfulThinking
asked on
Error message with PSEXEC
I am trying to run an executable on a remote machine using PSEXEC.
PSEXEC.EXE \\%SysName% -u %UserName% -p %PassWord% -i d:\path\file.exe
Get an error message:
PSEXEC.EXE \\%SysName% -u %UserName% -p %PassWord% -i d:\path\file.exe
The system cannot find the file specified.
What's wrong?
PSEXEC.EXE \\%SysName% -u %UserName% -p %PassWord% -i d:\path\file.exe
Get an error message:
PSEXEC.EXE \\%SysName% -u %UserName% -p %PassWord% -i d:\path\file.exe
The system cannot find the file specified.
What's wrong?
If you do not see the psexec header lines, psexec itself is not found in your path. Did you check that?
ASKER
if you mean the "PsExec v1.98 - Execute processes remotely ...", yes I see those. Also "Contacted remote machine" and "starting service", but then the error message.
if the path to the .exe file has spaces in it, you may need to quote it:
"d:\path with spaces\file.exe"
"d:\path with spaces\file.exe"
ASKER
no spaces in the path .... I did try the following but it seemed to hang
psexec \\%SysName% -c file.exe -s
psexec \\%SysName% -c file.exe -s
Put the password in double quotes or change it to something that does NOT contain any of these characters: & < > | ^ %.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Qlemo ... I tried the command as you suggested, took a smoke break, and it's still sitting there. I have the line in a bat file, but tried just from the command line, still no luck. Maybe it has to do with my credentials? I'm an OU admin, running the command with my admin credentials, on a remote workstation in my OU .... I've tried REXEC with the same results. I'm lost ...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
from the first command check that visit the remote machine and check that d:\path\file.exe exists or check \\compname\d$\path\file.ex e exists if you only have remote access
could run it with cmd /c d:\path\file.exe as wel
could run it with cmd /c d:\path\file.exe as wel
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I split up the points as all of you had suggestions that worked. Still don't know what the problem was, but after removing the service and rearranging the parameters in my command line, it worked! Thanks!