lightweight
lightweight

Reputation: 3337

psexec giving the system cannot find the file specified

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.

Upvotes: 4

Views: 51427

Answers (5)

Lightsout
Lightsout

Reputation: 3757

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.

Upvotes: -2

anselm
anselm

Reputation: 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.

Upvotes: -1

actor39
actor39

Reputation: 21

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.

Upvotes: 2

David Aleu
David Aleu

Reputation: 3942

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"

Upvotes: 5

Ansgar Wiechers
Ansgar Wiechers

Reputation: 200293

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 ...

Upvotes: 3

Related Questions