I've reached the limit of my knowledge about PSExec; I'm working with a software stack that uses it to kick off some batch files and perl scripts on remote machines, but something's wrong with one of the machines and we're not sure what to try. I'm getting the following:
PsExec could not start explorer.exe on [machine name redacted]:
The system cannot find the file specified.
when running the following command:
psexec -i -u [username redacted] -p [password redacted] \[machine name redacted] explorer.exe C:\TestAutomation\RunScript.pl
That command works on other machines, so it's a machine problem, almost certainly with the target machine (since I can run the same command targeting a different machine and it works fine). If I remote desktop into the target machine, I can run the following command:
explorer.exe C:\TestAutomation\RunScript.pl
And it works fine. I have C:\Windows shared as ADMIN$. If I remote desktop into the machine, I get "No process is on the other end of the pipe", which seems to be a common issue with PSExec not understanding RDP; if I run a net use command first (which is what our normal software stack does), however, I go back to getting the above error.
Where do I go from here in my troubleshooting process?
ETA:
C:>psexec -i -u [username redacted] -p [password redacted] \[machine name redacted] C:\Windows\explorer.exe C:\TestAutomation\RunScript.pl
has the exact same result (cannot find file)
C:>psexec -i -u [username redacted] -p [password redacted] \[machine name redacted] ping [second machine name redacted]
works just fine.
C:>psexec -i -u [username redacted] -p [password redacted] \[machine name redacted] C:\Windows\explorer C:\TestAutomation\RunScript.pl
gets me
PsExec could not start C:\Windows\explorer on [machine name redacted]:
Access is denied.
while
C:>psexec -i -u [username redacted] -p [password redacted] \[machine name redacted] explorer C:\TestAutomation\RunScript.pl
gets me
PsExec could not start explorer on [machine name redacted]:
The system cannot find the file specified.
So I'm wondering if I don't have multiple problems? A path issue and an access issue? The username I'm using is an administrator on the remote machine.
psexec -i -u [username] -p [password] \\[machine] %windir%\system32\explorer.exe C:\TestAutomation\RunScript.pl