psexec giving the system cannot find the file specified
Asked Answered
A

5

4

I'm trying to run this from my win7 CMD (as Admin):

psexec IpAddress -u domain\user -p pword c:\Autobatch\ClientJobSender.exe http://reportserver.net:8070/JobExecutor.asmx c:\AutoBatch\backup\trigger.xml

but am getting a "the system cannot find the file specified" error.

I've also tried it this way:

psexec IpAddress -u domain\user -p pword c:\Autobatch\ClientJobSender.exe http://reportserver.net:8070/JobExecutor.asmx c:\AutoBatch\backup\trigger.xml

but get a unknown user or bad password.

What's weird is that I can connect via Remote desktop with the same IP address and user/pass.

Airtight answered 9/4, 2013 at 15:47 Comment(0)
U
5

Make sure the server has the settings below:

a) Admin share is enabled: run services.msc and check the Service "Server" is enabled
b) Add the key for the share in the registry and restart:
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v AutoShareServer /t REG_DWORD /d 1

And then use:

psexec \\IpAddress -u domain\user -p pword -w "c:\Autobatch" "ClientJobSender.exe http://reportserver.net:8070/JobExecutor.asmx c:\AutoBatch\backup\trigger.xml"
Undermanned answered 26/4, 2013 at 10:35 Comment(0)
S
3

Actually, I don't see a difference between your 2 command lines. However, the error from the first command is because your syntax is incorrect. You must use

PsExec \\a.b.c.d ...

instead of

PsExec a.b.c.d ...
Scrivens answered 9/4, 2013 at 17:50 Comment(4)
ok...so I tried this: psexec \\a.b.c.d -u username -p password c:\autobatch\trigger.bat but still get "Couldn't access a.b.c.d: The network path was not found." it also says "Make sure that default admin$ share is enabled on a.b.c.d." but am not sure how to check thatAirtight
On the remote host run net share in a command prompt. The command lists the shares provided by the host. You also need to be able to access ports 135/tcp (RPC endpoint mapper) and 445/tcp (Direct SMB) on the remote host. If you have the Windows Firewall enabled, you must add exceptions for these ports.Scrivens
I only got the following Share Names back. IPC$ and Hosting. There was no "Resource for IPC$ and the Resource for Hosting was "D:\Hosting." Is IPC$ what I'm looking for? windows firewall is also turned off completely.Airtight
If admin$ is missing on the remote host, some genius seems to have disabled administrative shares. Re-enable them.Scrivens
T
2

I got it to work by elevating the local batch file to execute with administrator privileges, that is to say, the terminal window was operating with administrator privileges.

Tenterhook answered 27/3, 2015 at 2:18 Comment(0)
K
-1

If you're trying to use automation services, you can use the ClientJobSender.exe on the local machine (or on the machine where you set up the scheduling). Just copy the ClientJobSender.exe and the related config file from the install pack to the scheduler server and refer it locally.

Kitts answered 8/12, 2015 at 10:9 Comment(0)
C
-2

You might have the directory path wrong. Try change the .exe path into cmd.exe and cd into your intended path to see if it is actually the correct path.

Cradlesong answered 20/7, 2022 at 21:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.